Ok, new question:
Here's my script:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Adds the HOSTS file
Const OverwriteExisting = TRUE
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
objFSO.CopyFile "\\server\updates\hosts", WshShell.ExpandEnvironmentStrings("%systemroot%\system32\drivers\etc\"), OverwriteExisting
'This copies the SDAT.exe file to C:\ and then installes it with a silent switch
objFSO.CopyFile "\\server\updates\sdat.exe" , "c:\", OverwriteExisting
wshshell.run "c:\sdat.exe -s",,true
set wshshell=Nothing
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
When the script copies the sdat.exe to the computer will it automatically wait for the file to download before moving on to executing the file? I wouldn't want the script to start installing an old sdat that was previously downloaded to the client ... Would I have to put a pause between the two actions?
According to another post, the TRUE at the end of the RUN statement makes the script wait before proceeding on ...
Should I have a TRUE at the end of the download line? Something like:
objFSO.CopyFile "\\server\updates\sdat.exe" , "c:\", OverwriteExisting, TRUE
(I know that's incorrect since I tried it and it errored!)
)
Thanks again!
Tommy
Here's my script:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Adds the HOSTS file
Const OverwriteExisting = TRUE
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
objFSO.CopyFile "\\server\updates\hosts", WshShell.ExpandEnvironmentStrings("%systemroot%\system32\drivers\etc\"), OverwriteExisting
'This copies the SDAT.exe file to C:\ and then installes it with a silent switch
objFSO.CopyFile "\\server\updates\sdat.exe" , "c:\", OverwriteExisting
wshshell.run "c:\sdat.exe -s",,true
set wshshell=Nothing
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
When the script copies the sdat.exe to the computer will it automatically wait for the file to download before moving on to executing the file? I wouldn't want the script to start installing an old sdat that was previously downloaded to the client ... Would I have to put a pause between the two actions?
According to another post, the TRUE at the end of the RUN statement makes the script wait before proceeding on ...
Should I have a TRUE at the end of the download line? Something like:
objFSO.CopyFile "\\server\updates\sdat.exe" , "c:\", OverwriteExisting, TRUE
(I know that's incorrect since I tried it and it errored!)
Thanks again!
Tommy