Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. sub RunLoadstate(strSourceComputer, strDestinationComputer )
  4. If objFSO.FileExists(strCentralRepository & "\" & strSourceComputer & "\USMT\USMT.MIG" ) Then
  5. strRemoteFile = "\\" & strDestinationComputer & "\C$\USMTLocalLoadstate.vbs"
  6. objFSO.CopyFile "C:\USMTScript\USMTLocalLoadstate.vbs", strRemoteFile, TRUE
  7. If objFSO.FileExists(strRemoteFile) Then
  8. objShell.Run "psexec \\" & strDestinationComputer & " -s cmd /c " & chr(34) & "cscript.exe c:\USMTLocalLoadstate.vbs" & " " & strSourceComputer & chr(34)
  9.  
  10. Else
  11. wscript.sleep 6000
  12. error1 = MsgBox("Check " & strDestinationComputer & " is online",16,"Error")
  13. document.write(error1)
  14. End if
  15. Else
  16. wscript.sleep 6000
  17. error = MsgBox("Unable to find the USMT MIG file for " & strSourceComputer,16,"Error")
  18. document.write(error)
  19. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement