Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub RunLoadstate(strSourceComputer, strDestinationComputer )
- If objFSO.FileExists(strCentralRepository & "\" & strSourceComputer & "\USMT\USMT.MIG" ) Then
- strRemoteFile = "\\" & strDestinationComputer & "\C$\USMTLocalLoadstate.vbs"
- objFSO.CopyFile "C:\USMTScript\USMTLocalLoadstate.vbs", strRemoteFile, TRUE
- If objFSO.FileExists(strRemoteFile) Then
- objShell.Run "psexec \\" & strDestinationComputer & " -s cmd /c " & chr(34) & "cscript.exe c:\USMTLocalLoadstate.vbs" & " " & strSourceComputer & chr(34)
- Else
- wscript.sleep 6000
- error1 = MsgBox("Check " & strDestinationComputer & " is online",16,"Error")
- document.write(error1)
- End if
- Else
- wscript.sleep 6000
- error = MsgBox("Unable to find the USMT MIG file for " & strSourceComputer,16,"Error")
- document.write(error)
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement