Hi,
I have an app to be used as a dialog box that needs to be running as long as the wscript.exe or cscript.exe processes are running. It will be launched by a vbscript so wscript or cscript will be running at the time the form comes into view. When the script stops running for whatever reason, I need my app to kill itself. There are no controls to interact with on this app.
My thinking is that my app will need to run in a loop to continually check for changes in running processes until it finds that wscript and cscript processes are no longer running. Once my app is up and running, which event is best suited for this loop? I would like the process monitoring to begin right after the form loads so I don't think the Form Load event is the right one to use.
I'd like to take a stab at writing the code once I know which event I should be using. There are plenty of examples on how to check and kill processes.
Thanks,
Rob
I have an app to be used as a dialog box that needs to be running as long as the wscript.exe or cscript.exe processes are running. It will be launched by a vbscript so wscript or cscript will be running at the time the form comes into view. When the script stops running for whatever reason, I need my app to kill itself. There are no controls to interact with on this app.
My thinking is that my app will need to run in a loop to continually check for changes in running processes until it finds that wscript and cscript processes are no longer running. Once my app is up and running, which event is best suited for this loop? I would like the process monitoring to begin right after the form loads so I don't think the Form Load event is the right one to use.
I'd like to take a stab at writing the code once I know which event I should be using. There are plenty of examples on how to check and kill processes.
Thanks,
Rob