I have a script that checks remote computers for the latest update for
a software package. If the update is not on the computer, I want the
script to record the comptuer name to a file, and then copy a MSI file
to the computer, then execute that MSI file in quiet mode. I'm having
trouble because every time the script runs, it reinstalls the update on
my local machine and not the remote machine. Pertinent part of the
script is as follows:
Else
Myfile =
"\\ServerShare\ProgramFolder\Upgraded.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set textstream = fso.OpenTextFile(myFile, 8, True)
Textstream.WriteLine("**********************")
Textstream.WriteLine("ComputerName: " &
strComputer)
Textstream.Close
src = "\\ServerShare\ProgramFolder\File.msi"
dest = "\\"& strComputer
&"\C$\VViewer2003.msi"
fso.copyfile src, dest, true
Set objShell =
CreateObject("WScript.Shell")
cmd = "cmd /c psexec C:\VViewer2003.msi"
objShell.Run cmd, 1, True
Any help would be greatly appriciated!
Bookmarks