I'm really new to VB Script and am trying to figure out how to pass a switch to an executable thru VB Script. What I'm doing is connection to a target machine, going to a specific directory, copying a group of files to the directory and then trying to execute a program using PSExec. The whole process works, but the program requires a password. There is a switch that I can pass with the password to do it, but I can't figure out the correct syntax in VB Script to do it. The command line would look like....
c:\%systemroot%\propatches\agtinstallerx.exe /PW password
Here is the code....
For Each sLine In aComp
If FileSystem.FolderExists ("\\" & sLine & "\c$\winnt") Then
sDest = "\\" & sLine & "\c$\winnt\ProPatches\"
sRexe = """C:\winnt\ProPatches\AgtInstallerX.exe /PW password"""
sDest = "\\" & sLine & "\c$\windows\ProPatches\"
sRexe = """C:\windows\ProPatches\AgtInstallerX.exe /PW password!"""
Would greatly appreciate the help.