Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. strCommand = """c:this.exe"" IEXPLORER=1"
  2. Set objShell = CreateObject("WScript.Shell")
  3. objShell.Run strCommand, 0, True
  4.  
  5. Function wait()
  6. set service = GetObject ("winmgmts:")
  7. for each Process in Service.InstancesOf ("Win32_Process")
  8. If Process.Name = "this.exe" then
  9. WScript.Sleep 2000
  10. call wait()
  11. wscript.echo "file is not running"
  12. End If
  13. next
  14. wscript.echo "File is running"
  15. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement