humbletech99
Programmer
Is there a way to set a maximum time on execution of a vbscript from within the vbscript itself?
Eg. in some languages you can set an alarm function near the beginning which terminates the script with a custom message if execution of the rest of the script takes longer than X seconds.
This means that if a later part of the script was to hang, the alarm mechanism started near the beginning would kill the remaining execution and exit gracefully with a message.
Any ideas on a timeout of execution within a vbscript? Perhaps some COM method? I'm not sure if I'm close with something like System.Windows.Forms.Timer or if I'm way off.
In any event I need it to be portable and not rely on installing the .NET framework. It has to come bundled with all modern windows versions, 2000/2003/XP...
Eg. in some languages you can set an alarm function near the beginning which terminates the script with a custom message if execution of the rest of the script takes longer than X seconds.
This means that if a later part of the script was to hang, the alarm mechanism started near the beginning would kill the remaining execution and exit gracefully with a message.
Any ideas on a timeout of execution within a vbscript? Perhaps some COM method? I'm not sure if I'm close with something like System.Windows.Forms.Timer or if I'm way off.
In any event I need it to be portable and not rely on installing the .NET framework. It has to come bundled with all modern windows versions, 2000/2003/XP...