Jump to content
Sign in to follow this  

Check the exit status of a called executable

Recommended Posts

Hi all!

Ok, I think this should be a simple solution, but I don't know how to script it. I am invoking an external setup.exe with some switches, identifying the Process ID, pausing the script until the setup finishes and then I need to check the exit status of the external setup.exe process. I've got everything working, but I'm not sure how to determine the exit status of the setup file. Furthermore, I'm not sure what the possible exit codes are for the setup file. I thought that when a setup finished it exits with status = 0 but I'm not 100% sure. Here is what I have...

$path = "c:\setup.exe"

$PID = Run ($path & " /silent")

ProcessWaitClose ($PID)

Now I'm not sure what to use. Any ideas?


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  

  • Create New...