hovercraft
Technical User
Greetings,
I have been using this code in XP & AC2002 with out problems. When I put it on a VISTA machine with AC2007, I see the command prompt open, then close and the script is not executed.
I think VISTA is trying to run it as a screen saver even though ftp.exe is called. Any ideas as to what I need to change in order to use this with vista ... or perhaps it's a 2007 issue?
Thanks,
Hovercraft
I have been using this code in XP & AC2002 with out problems. When I put it on a VISTA machine with AC2007, I see the command prompt open, then close and the script is not executed.
I think VISTA is trying to run it as a screen saver even though ftp.exe is called. Any ideas as to what I need to change in order to use this with vista ... or perhaps it's a 2007 issue?
Code:
'******* Code Start *****
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
Sub sFTP(stSCRFile As String)
'Usage Example:
' call sFTP("C:\temp\test.scr")
'Sample SCR File for NT/Win95 FTP
' lcd "c:\temp"
' open ftp.someserver.com
' anonymous
' dash10@hotmail.com
' cd public
' binary
' get dead.letter dead.letter
' bye
Dim stSysDir As String
stSysDir = Environ$("COMSPEC")
stSysDir = Left$(stSysDir, Len(stSysDir) - Len(Dir(stSysDir)))
Call Shell(stSysDir & "ftp.exe -s:" & stSCRFile, vbNormalFocus)
End Sub
'********** Code End *******
Thanks,
Hovercraft