Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a VB Expert!

Join 244,309 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 861 people online right now. Registration is fast and FREE... Join Now!




FTP, Unzip and Execute- VB.NET

 
Reply to this topicStart new topic

FTP, Unzip and Execute- VB.NET

nmurendo
1 Dec, 2008 - 05:33 AM
Post #1

New D.I.C Head
*

Joined: 12 Sep, 2008
Posts: 7

Can anyone good in .NET please convert this VB6 please. VB6 has post deployment errors for example where it says files are out of date. I need this for getting a named file from an ftp site, unzip it and run the executable.

CODE

Option Explicit
Public success As Long
Private Sub Form_Load()
Dim i As String
Dim j As String
Dim k As String
On Error GoTo ErrH
Inte_Pro
Unzip_Files
Execute_Files
Debug.Print "Finished download"
Unload Me
Exit Sub
ErrH:
  MsgBox Err.Description & vbCr & Err.Source
Exit Sub
End Sub
Public Sub Execute_Files()
On Error GoTo ErrH
Dim RetVal
RetVal = Shell(App.Path & "\RouteSmsSMPPClient.exe", 1)
Exit Sub
ErrH:
  MsgBox Err.Description & vbCr & Err.Source
Exit Sub
End Sub
Public Sub Unzip_Files()
On Error GoTo ErrH
        ZIPLight1.ZipFileName = App.Path & "\RouteSmsSMPPClient.zip"
        ZIPLight1.ExtractDirectory = App.Path
        ZIPLight1.FilesToProcess = "*"
        ZIPLight1.Extract
        Exit Sub
ErrH:
  MsgBox Err.Description & vbCr & Err.Source
Exit Sub
End Sub
Public Sub Inte_Pro()
Dim RemoteFile, LocalFile
    RemoteFile = "RouteSmsSMPPClient.zip"
    Form1.Inet1.URL = "ftp://192.168.1.14/"
    'Form1.Inet1.URL = "ftp://serv13:21/FTPFiles/"
    Form1.Inet1.Execute , "Get " & RemoteFile & " " & App.Path & "\" & RemoteFile
      
End Sub


User is offlineProfile CardPM
+Quote Post


VB Crash
RE: FTP, Unzip And Execute- VB.NET
1 Dec, 2008 - 08:12 AM
Post #2

D.I.C Head
**

Joined: 28 Nov, 2008
Posts: 130



Thanked: 7 times
My Contributions
Well I'm not sure that will works..but I'll give you try...

Vace
User is offlineProfile CardPM
+Quote Post

Jayman
RE: FTP, Unzip And Execute- VB.NET
1 Dec, 2008 - 10:15 AM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 8,063



Thanked: 159 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Open the project in VS.NET. There is a conversion wizard that will do most of the work for you.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 07:10PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month