Sign in to follow this  
Followers 0
gcue

process is done running on a remote machine?

5 posts in this topic

#1 ·  Posted (edited)

I am trying to get around using sleep()

I am running a psexec (which can execute commands on a remote machine) - problem is, i dont know when its done running the app.

in this particular case it's updating an application (bloomberg)

can any of you guys think of a creative way to figure out when a process is done running on a remote machine?

RunWait(@ComSpec & " /c c:\cg\support\psexec \\" & $asset & " -d -i c:\temp\upbb.exe /s")

Sleep(20000)

While FileExists("\\" & $asset & "\c$\temp\upbb.exe")
FileDelete("\\" & $asset & "\c$\temp\upbb.exe")
WEnd
Edited by gcue

Share this post


Link to post
Share on other sites



@qcue...Did you try ShellExecuteWait() or you can just run the program and keep checking until the process doesnt exist using ProcessExists().

Share this post


Link to post
Share on other sites

processexists works for remote processes?

hmm dont see that in the help

Share this post


Link to post
Share on other sites

neat!

thanks! =)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0