1 Reply Latest reply on Nov 25, 2013 8:15 AM by cplatero

    Alternative to WScript.Quit in Custom Definitions?

    Rookie

      I've got a repair script in a custom definition that goes through some rather complex logic to decide which value to set in a registry key.

       

      I'd like the script to run as quickly as possible, so I want it to be able to exit as soon as it's hit the point where it's figured out what value it should set and sets it.

       

      In a script running from the command line, I'd simply say "wscript.quit" at the point I wanted it to stop running.

       

      From what I can tell, this cause LANDesk Patch Management to generate an error.

       

      The Vulscan log tells me this:

         Command Interpreter running

         ERROR.  Microsoft VBScript runtime error: Object required: 'WScript' (line: 725, char: 2, text: )

         Message returned from repair script was Unexpected error in custom script source.  See agent log for details

       

      That would seem to imply that you can't use "WScript.Quit" in a repair script.

       

      I've seen some other community posts that imply the same thing.

       

      If you can't use "Wscript.quit", what's the correct way to terminate the script at a specific point in LANDesk's command interpreter?