Re: Remove and Add Printer Script



Rem out the "On Error Resume Next" statement by putting an apostrophe
before the line. Then rerun the script. It will crash at the exact
point where the problem is occurring and it will tell you the line
number.

This will help you troubleshoot the problem. The reason it is not
crashing now is that the "On Error Resume Next" causes VBScript to
ignore any errors and move on to the next command.

As a general rule, you should not run your entire script with error
checking turned off. If you have a function that may fail, you can
turn off error checking with "On Error Resume Next" and then
immediately after the function finishes, turn error checking back on
with "On Error Goto 0"

.



Relevant Pages

  • Re: Remove and Add Printer Script
    ... Then rerun the script. ... It will crash at the exact ... turn error checking back on ... I tried that and I get the same exact result. ...
    (microsoft.public.scripting.vbscript)
  • Re: on input form showing error message for duplicate entry.
    ... my SITE will not crash. ... you can 'what if' the daylights out of this script. ... this scenario DOES NOT exist in this script. ... | i think, there is no sense to speak more about it, think again about my ...
    (alt.php)
  • RE: How to ensure a script to run when system crashes
    ... If the latter (Crash) there is no way to run some code AFTER the system has ... Your best bet is disabling Wake-On-Lan in the BIOS which should disable your ... I am running wmi script to enable one of the LAN connections during system ... for shut down but the unload event is not called when the system crashes. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: on input form showing error message for duplicate entry.
    ... this age you should to handle all, everytime some1 whants to crash you site ... i think, there is no sense to speak more about it, think again about my ... it means we can write to parts of script ...
    (alt.php)
  • Re: segmentation fault at the end of script
    ... >This script is launch by a script shell on an linux machine like this: ... Have you tried examining the core dump with gdb to give ... using a program that'll deliberately crash: ...
    (comp.lang.php)