DSCAN.EXE

The Driver Scan (DSCAN.EXE) utility can perform the following functions:

Two versions of the utility come with the ServerGuide Scripting Toolkit:
Microsoft uses the term device-driver directory to refer to the directory that contains drivers for an individual device. All device-driver files are located in individual device-driver directories that contain the files for an individual device driver. The following directories are device-driver directories: However, when specifying the source path for the ddcopy command, always specify the directory that contains the drvset.ini file. In this case, the source directory is the C:\w03_drv\$oem$\$1\drv directory.

When you issue a dscan command against a directory that contains device-driver directories, dscan performs its tasks against all of the subdirectories that the directory contains, with the exception of the drvutils directory. The drvutils directory contains two utilities, Holdit.exe and Reboot.exe, that are used by the unattend utility.

The Driver Scan utility stores information in an INI file named drvinfo.ini in the device-driver directory, for use by the unattend.exe utility. If the drvinfo.ini file already exists for the device driver, it is left unchanged. See DRVINFO.INI for information about the drvinfo.ini file. See UNATTEND.EXE for information about the unattend.exe utility.

The Driver Scan utility can also merge text mode device drivers into a single directory. This merges the device-driver files and the txtsetup.oem files for use in unattended installations. If the destination directory for text mode drivers already exists, it is automatically deleted and recreated.

The Driver Scan utility automatically assumes that the device driver being scanned is applicable to all target servers. To make a device driver server-specific, you must modify the drvinfo.ini file to reflect the servers that the device driver supports.

The dscan.exe utility has the following command-line syntax:
dscan <driver_path> [/S|/SS|/T[:path]] [/M:machine_type/platform_ID] [/H:filename
[/OW] [/V:n] [/W:n] [/O:file_name] [/?]
Parameter Description
driver_path
Defines the fully qualified path to the directory to scan for device drivers. Each driver is assumed to be in a separate subdirectory within this path.

If driver_path has $oem$ in the path, the Driver Scan utility creates the $oem$\textmode directory and merges the text mode device drivers.

If the /SS parameter is used, the path is assumed to be the path to a single device driver.

/S
Specifies to scan device drivers and create drvinfo.ini files only, if necessary. Text mode device drivers are not merged when this parameter is used.
/SS
Specifies to scan a single device driver and create the drvinfo.ini file only, if necessary. Text mode device drivers are not merged when this parameter is used.
/T[:path]
Specifies to build the text mode device drivers only. Other device drivers are not scanned, and drvinfo.ini files are not created when this parameter is used.

If path is specified, the text mode device drivers are merged to the specified path. Otherwise, the driver_path parameter must have $oem$ in the path so that the text mode device drivers are merged into the $oem$\textmode directory.

/M:machine_type/platform_ID
Specifies a machine type, where machine_type is the machine type of the target server or platform ID, where platform_ID is the platform ID of the target server, that is used to limit merging of the text-mode device drivers. If this parameter is not specified, all text-mode device drivers are merged. The /T parameter is required to use this parameter.
/H:filename	
Specifies a fully-qualified path and file name for the hwdetect.ini file that was created by the hwdetect.exe utility. This will limit the merging of the text mode device drivers to only those drivers detected in the system.
/OW
Overwrites the text-mode drivers without deleting and recreating the text-mode directory. This parameter is not valid with the /S parameter or the /SS parameter.
/V:n
Specifies the verbose level used to report status during the deployment process. Valid values for n are:
  • 0 - quiet mode
  • 3 - default
  • 5 - maximum information
/W:n
Specifies the version of Microsoft Windows for the device drivers:
  • 0 for Windows 2000
  • 1 for Windows Server 2003
  • 2 for Windows 2000 Professional
  • 3 for Windows XP
  • 4 for Windows Server 2003 x64
/O:file_name
Combines the information in the DrvInfo.Ini files into a single file specified by the file_name value
/?
Displays usage information
The dscan.exe utility returns the following values to indicate status:
Value Description
0 Success
1 Syntax error
2 Program error
3 Destination is read-only
The following examples illustrate Driver Scan utility usage.
Example Description
dscan c:\insttemp\$oem$\$1\drv
Scans a device-driver set in c:\insttemp\$oem$\$1\drv, creates the drvinfo.ini files for each device driver, and builds the text-mode directory
dscan c:\drv /S
Scans a device-driver set in c:\drv and creates drvinfo.ini files for each device driver, but does not build the text mode device drivers
dscan c:\drv\mydriver /SS
Scans a single device driver in d:\drv\mydriver and creates the drvinfo.ini file for that device driver, but does not build the text mode device driver
dscan c:\w2\$oem$\$1\drv /T
Builds the text mode directory in c:\w2\$oem$\textmode using device drivers found in c:\w2\$oem$\$1\drv, but does not create any drvinfo.ini files
dscan c:\drivers /T:c:\other\textmode
Builds the text mode directory in c:\other\textmode using device drivers found in c:\drivers, but does not create drvinfo.ini files