To Exit Windows Quietly
Keywords: exit windows quietly IntControl 12 termination close applications
Sometimes when using WinBatch to exit Windows, the system complains, "Are you sure you want to terminate batch processing now?"
To bypass this message and exit quietly, use IntControl 12.
IntControl (12, 1, 0, 0, 0)IntControl 12 is used to direct WIL and it's parent application (if the parent application supports this function) as to how to handle users either terminating WinBatch via the "Ctrl-Break" keystroke sequence, or perhaps via a menu item, or by simply exiting Windows.
Example:
; We want to refuse termination requests and refuse any attempt to ; exit Windows until the WIL script is complete ; To do this, we use codes 2 and 8. IntControl(12,2+8,"Close Net apps before exiting Windows", 0, 0 )
Article ID: W12990Filename: Exit Windows Quietly.txt