12.14 RunDOS

Use this Knowledge Script to run a non-interactive DOS command. This script raises an event if an unexpected exit code is raised. For example, use this script to run a batch command for virus scanning, disk backup, or logging an entry in a trouble ticket system.

12.14.1 Resource Objects

Windows 2003 Server or later

12.14.2 Default Schedule

The default schedule for this script is Every 30 minutes.

12.14.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event Notification

Create event if command executes successfully?

Select Yes to raise an event if the DOS command you specified executes successfully. The default is unselected.

Severity - Command executed successfully

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the specified DOS command executes successfully. The default is 25 (blue event indicator).

Create event if process failed to execute?

Select Yes to raise an event if the DOS command you specified did not execute successfully. The default is Yes.

Severity - Command failed to execute

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the specified DOS command did not execute successfully. The default is 5 (red event indicator).

Severity - Job failure

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the RunDOS job fails unexpectedly. The default is 5 (red event indicator).

Data Collection

Collect exit code data?

Select Yes to collect data for charts and reports. If enabled, data collection returns exit code data; including the specified command string, current exit code, normal exit code, and explanation. The default is unselected.

Administration

Normal/Expected exit code

Specify the exit (return) code expected when the command runs and exits normally (successfully). The default is 0.

Command or full path to script file

Specify the DOS command or script filename to run. For example, C:\temp\myscript.bat. Do not use a command that requires input.

NOTE:If the command you are entering includes quotation marksĀ ("), enclose the quoted string in a second set of quotation marks. For example, if the DOS command is net send "message" you would enter: net send ""message"".

Full path to command output file

Provide the full path and filename to specify a file to write command output. If you do not specify the full path, AppManager creates the file in %systemroot%\System32\ or %systemroot%\SysWOW64.

Full path to error output file

Provide the full path and filename to specify a file to write error output. If you do not specify the full path, AppManager creates the file in %systemroot%\System32\ or %systemroot%\SysWOW64.

Append to output files?

Select Yes to add information to the command and error output files. The default is Yes.

Time to wait for process to complete

Specify the maximum number of seconds the specified DOS command or script file should take to execute. The default is 10.

Set to 0 to run the DOS command without checking the exit code.