Jump to content
Sign in to follow this  
gcue

process is done running on a remote machine?

Recommended Posts

gcue

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
DjDeep00

@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
gcue

processexists works for remote processes?

hmm dont see that in the help

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.