code_junkie

WScript.Shell and blocking execution?

Nov 10th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. ZipCommand = "7za.exe a -r -y " & ZipDest & BuildLabel & ".zip " & buildSourceDir
  2.  
  3. Set wshShell = WScript.CreateObject("Wscript.Shell")
  4. wshShell.run ZipCommand
  5.  
  6. ZipCommand = "7za.exe a -r -y " & ZipDest & BuildLabel & ".zip " & buildSourceDir
  7.  
  8. Set wshShell = WScript.CreateObject("Wscript.Shell")
  9.  
  10. wshShell.Run ZipCommand,1,1
  11.  
  12. Dim WshShell, oExec
  13. Set WshShell = CreateObject("WScript.Shell")
  14.  
  15. Set oExec = WshShell.Exec(ZipCommand)
  16.  
  17. Do While oExec.Status = 0
  18. WScript.Sleep 100
  19. Loop
Add Comment
Please, Sign In to add comment