This requires a call to SetConsoleCtrlHandler() in order to set a callback routine for console events. VBScript can't make API calls or supply callback routines.
I suppose it might be possible for an ActiveX component to do this. I don't know of any offhand.
I don't know of any signal that might be passed in by CScript either.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.