Page 1 of 1

Close Secondary Window

Posted: 08 Nov 2006 20:15
by sgilmour
Hi,

I have a script that opens a secondary dos window. The script has an exit sequence to exit that program and close the secondary window.

I run in to a problem if the user closes the window with the X button on the second window and the rest of my main program does not move on unless I ctrl-C in the main-window which runs in a minimized state and I don't want user to interact with.

Is there away to determine the ERRORLEVEL created when using the X button - I could then check for that ERRORLEVEL and address that issue as I need to, or is there away to disable the X button from a CMD script?

Thanks for any help / suggestions anyone may have.

Posted: 15 Nov 2006 22:57
by sgilmour
Worked it out - used tasklist to find running tasks.