Calin's Humble Scanner - User Guide

Command Line usage

Description
Return Values
Windows Event Logs - Event IDs
Examples

Description

The CHScanner can be made scriptable by calling it from a script and suppling corresponding parameters in the command line. I am calling this "automatic mode" from now on.

After the automatic mode execution terminates, the application returns an error code and writes an event in the Windows Event Logs, under the Application section. There are now 8 error codes (including the success one) returned and there are also 8 corresponding event ids to be written in Windows Event Log. All these are detailed in the next sections of this page.

The parameters are:

Note

The command line parameters are NOT case sensitive.

Return Values

After running in automatic mode, the CHScanner application returns one of the following values:

To get the return code, in a batch file, check the value of the %errorlevel% defined variable. To do a quick test, just do a echo %errorlevel% after calling CHScanner with some parameters in your batch file.

Windows Event Logs - Event IDs

After running in automatic mode, the CHScanner application will write one of the following events using Windows Event Logs, under the Application item:

Examples

Command line examples

Batch file, first example

Small and dumb example of a batch file:

@echo off
CHScanner -Passive 25
echo The application has returned the code %errorlevel%
          

Batch file, second example

Another, not so small but equally dumb, example of a batch file:

@echo off
CHScanner -Scan testScanCfg.chs
goto result%errorlevel%

:result0
echo Done.
goto :EOF

:result1
echo Invalid parameter !
goto :EOF

      ... and so on ...
          

[ User Guide ]