Close Secondary Window

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sgilmour
Posts: 5
Joined: 31 Oct 2006 16:16

Close Secondary Window

#1 Post by sgilmour » 08 Nov 2006 20:15

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.

sgilmour
Posts: 5
Joined: 31 Oct 2006 16:16

#2 Post by sgilmour » 15 Nov 2006 22:57

Worked it out - used tasklist to find running tasks.

Post Reply