You can also start OC Scanner using the Command Prompt. This gives you the chance to enter additional parameters and specify the behavior of OC Scanner.
To start a scan using the command-line:
- Open the Run window.
- Enter cmd and select OK.
- In the Command Prompt, enter the required value and press Enter.
| Option | Description |
|---|---|
| InventoryScan.exe | The same as a regular scan. |
| InventoryScan.exe -f scanFileName.cfg | You can provide the name of the specific scan file you want OC Scanner to use. This option is useful when you’ve got many scan files in the folder and you want to use only one of them for the scan. |
| InventoryScan.exe -r | Only generating report files. The Inventory.db file needs to be present in the folder. OC Scanner generates report files based on the stored data in the Inventory.db file. The reports are not sent to OC Reporter. This option is useful when OC Scanner couldn’t generate report files because of an error and you don’t want to repeat the whole scanning process. |
| InventoryScan.exe -r scanFileName.cfg | OC Scanner generates report files for the specified scan file. The Inventory.db file needs to be present in the folder. Depending on the scan file settings, the reports are sent to OC Reporter. This option is useful when OC Scanner couldn’t generate report files because of an error and you don’t want to repeat the whole scanning process. |
| InventoryScan.exe -s | Only sending report files. CSV files need to be present in the Reports folder of OC Scanner. If the CSV files of the current date are not available, the latest available CSV files are sent. OC Scanner sends the reports to the URL specified in the first scan file found. This option is useful when OC Scanner couldn’t send report files because of an error and you don’t want to repeat the whole scanning process. |
| InventoryScan.exe –s scanFileName.cfg | Only sending report files of a specific scan file. CSV files need to be present in the Reports folder. If the CSV files of the current date are not available, the latest available CSV files are sent. OC Scanner sends the reports to the location specified in the provided scan file. This option is useful when OC Scanner couldn’t send reports because of an error and you don’t want to repeat the whole scanning process. |
| InventoryScan.exe -ubat | Scanner is generating an update.bat file which will handle the update process. The default update process is done directly over InventoryScan.exe. However, it happens that sometimes (on some servers) the scanner process cannot immediately delete the current version. In such cases updating over .bat file can help, because its procedure has a repeat loop for the update process (it tries 5 times, lasting 10 seconds each). |
NOTE: If you run OC Scanner inside a configs folder, the application stops. The configs folder is reserved for API configuration.