Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

<?job?> Element

Specifies attributes for error handling.

<?job error="flag" debug="flag" ?> 

error

A Boolean value. False is the default value for all attributes. Set to true to allow error messages for syntax or run-time errors in the Windows Script (.wsf) file.

Debug

A Boolean value. False is the default value for all attributes. Set to true to enable debugging. If debugging is not enabled, you will be unable to launch the script debugger for a Windows Script file.

Although most Windows Script files normally run silently during production, you might find it useful to be notified of errors in the Windows Script (.wsf) file as you are developing it.

The following example incorporates two jobs into one .wsf file that uses two different scripting languages.

<package>
   <job id="DoneInVBS">
      <?job debug="true"?>
      <script language="VBScript">
         WScript.Echo "This is VBScript"
      </script>
   </job>

   <job id="DoneInJS">
      <?job debug="true"?>
      <script language="JScript">
         WScript.Echo("This is JScript"); 
      </script>
   </job>
</package>

Community Additions

Show:
© 2015 Microsoft