Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript - Trapping Control-C

Status
Not open for further replies.

humbletech99

Programmer
Nov 22, 2005
155
GB
I have some vbscript running in the cscript host for which I would like to trap and handle any Control-C event.

Anyone know how to do this?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top