Show/Hide Toolbars

After a Windows system has been scanned, DocusnapScript.exe will generate an XML file that contains all collected data. You can later import this XML file manually to Docusnap or have it imported by the Docusnap Server automatically.

During the installation of Docusnap, DocusnapScript.exe will be stored in the Tools folder of the application directory. To execute DocusnapScript.exe, no additional files are required.

Parameters:

  • C: Sets the name of the workstation.
  • D: Sets the name of the domain where the system to be scanned is located.
  • H: Opens the help screen.
  • L: Sets the debug level to be used during the inventory scan.

         The following debug levels are available:

         1: Errors and function calls will be logged.

         2: The entire program flow will be logged.

  • O: Sets the path where to generate the XML file. If the process creates a log file, it will be stored in this path.

Docusnap-Windows-Script-commoand-Line

Examples:

If you run the script on the system you want to inventory, no additional parameters are required. You can specify the location of the XML file using the -O parameter.

Docusnap-Script-Windows-Command-Line-O

If you intend to use the script for an inventory scan of a remote system, you can specify the system to be scanned using the -C and -D parameters.

Docusnap-Script-Windows-Command-Line-C-D

This command will scan the WKNE006 workstation in the intern.local domain using debug level 2. The XML file will be stored in the C:\DocusnapScripts directory.

Software Search

The Docusnap Software Search feature enables you to inventory software products that cannot be scanned through the Windows inventory process. You can include a Software Search command in the Docusnap script. To use the Software Search feature, you need to create an XML software list manually.

The XML file must have the following structure:

<SoftwareItem>

<SoftwareName>My New Software 1</SoftwareName>

<SoftwarePublisher>Microsoft</SoftwarePublisher> <!-- optional-->

<SoftwareVersion>1.0 Beta</SoftwareVersion> <!-- optional-->

<FileName>notepad.exe</FileName>

<SearchPath>C:\Windows</SearchPath>

<FileSize>193536</FileSize> <!-- optional byte-->

<ModifyDate>01.01.2016</ModifyDate> <!-- optional-->

</SoftwareItem>

Make sure to specify the filename correctly or use a wildcard character (?,*).

 

 

<SoftwareItem>

<SoftwareName>My New Software 1</SoftwareName>

<SoftwarePublisher /> <!-- optional-->

<SoftwareVersion /> <!-- optional-->

<FileName>notepad.exe</FileName>

<SearchPath>C:\Windows</SearchPath>

<FileSize /> <!-- optional byte-->

<ModifyDate /> <!-- optional-->

</SoftwareItem>

If one of the optional parameters is not specified, use the notation shown in the example to the left (<SoftwarePublisher />).

If you specify a wrong file size, the desired software will not be scanned!

 

To use the software list in the DocusnapScript, use the following command:

DocusnapScript.exe -S <path\><filename.xml>

Docusnap-Script-Windows-Command-Line-Parameter-S

If a defined software product is found during the execution of the script, its data will be stored in the results XML file. When you import the XML file into Docusnap, this data will be imported as well.

Additional Tools

Through the use of additional tools, further information about a Windows system can be captured during the inventory. The execution of the additional tool can also be started as part of the Docusnap script. To execute the additional tool, an XML file with the required information must be created.

The XML file must have the following structure:

<ToolInfo>

 <Url>systeminfo.exe</Url>

 <Parameters> </Parameters>

 <ResultFile>systeminfo.txt</ResultFile>

 <OpenWith>notepad.exe</OpenWith>

 <Description>Systeminfo</Description>

 <ToolType>0</ToolType>

 <Timeout>10000</Timeout>

 <ExecuteRemote>false</ExecuteRemote>

</ToolInfo>

 

To execute the additional tools in DocusnapScript, use the following command:

DocusnapScript.exe -Y <path\><filename.xml>

Docusnap-Script-Windows-Command-Line-Parameter-Y

Data collected during the execution of additional tools as part of the script, is stored in the result XML file. By importing the XML file into Docusnap, this data will be imported as well.