Stampinf Command Options

Stampinf is a command-line tool that updates common INF file directives.

Stampinf -f filename 
[-s section] 
[-d [date | *]] 
[-a [architecture]] 
[-c catalogfile]
[-v [time | *]]
[-k version] 
[-u version]
[-i path]
[-n]

Parameters

-f filename
Specifies the INF or INX file to process.

-s section
Specifies the INF section in which to put the INF DriverVer directive. The default location for this directive is the INF Version section.

-d [ date | \]
Specifies the date that is written in the INF DriverVer directive. The format for the date is month/date/year
(for example, -d 10/20/2011).

To use the current date, specify an asterisk (*) with this parameter.

If the -d parameter is not specified or is specified without any options, Stampinf uses one of the following date values:

  • If the STAMPINF_DATE environment variable is set, Stampinf uses the date value that is specified by this environment variable.

  • If the STAMPINF_DATE environment variable is not specified, Stampinf uses the current date.

-a [ architecture ]
Specifies the architecture string to replace the $ARCH$ variable that is used in INX files. The $ARCH$ variable is used to customize a TargetOSVersion decoration in an INF Manufacturer section, and its respective section name, to a specific platform. For more information about the $ARCH$ variable, see Using INX Files to Create INF Files.

The values for the architecture string are x86, 64 (for Itanium-based platforms), and x64 (for amd64 platforms).

If the -a parameter is not specified or is specified without any options, Stampinf uses the value that is specified by the Platform environment variable, which is set in the build environment window.

-c catalogfile
Specifies the value that is written in the CatalogFile directive in the INF Version section. By default, the CatalogFile directive is not written.

-v [ time | *]
Specifies the time that is written in the INF DriverVer directive for the version number. The format for the time is hours.minutes.seconds.milliseconds (for example, 11.30.20.15). This option is useful during development because it provides a convenient way to increase the version number of the driver.

To use the current time, specify an asterisk (*) with this parameter.

If the -v parameter is not specified or is specified without any options, Stampinf uses one of the following version number values:

  • If the STAMPINF_VERSION environment variable is set, Stampinf uses the version number value that is specified by this environment variable.

  • If the STAMPINF_VERSION environment variable is not specified, Stampinf extracts the version number from the Ntverp.h file.

-k version
Specifies the version of KMDF that this driver depends on. This is used to customize the KmdfLibraryVersion and KMDF co-installer name in the INF file. This option replaces the $KMDFVERSION$ and $KMDFCOINSTALLERVERSION$ keywords in the INF file. The string has the following format:

<major_version>.<minor_version>

For example, if you specify 1.5 as the version string, the values 1.5 and 01005 are used for the two keywords (respectively).

-u version
Specifies the version of UMDF that this driver depends on. This option is used to specify the UmdfLibraryVersion and UMDF co-installer name in the INF file. The version that is specified replaces the $UMDFVERSION$ and $UMDFCOINSTALLERVERSION$ keywords in the INF file. The version string has the has the following format:

<major_version>.<minor_version>.<service_version>

(where <service_version> is typically zero).

For example, if you specify 1.5.0 as the version string, the values 1.5.0 and 01005 are used for the major and minor keywords (respectively).

-n
Shows verbose Stampinf output.

-i path
Specifies the location of the Ntverp.h file. The path represents a fully-qualified location of the directory that contains Ntverp.h

Comments

The date value that Stampinf puts in the INF DriverVer directive is not based on Coordinated Universal Time (UTC), which is also known as Greenwich Mean Time. However, Inf2Cat interprets the date value of this INF directive as a UTC value. This could lead to errors if the local date value that is used by Stampinf is interpreted by Inf2Cat as a UTC value for tomorrow's date. To avoid this problem, do one of the following:

  • Set the STAMPINF_DATE environment variable to the appropriate UTC date value. Now run Stampinf without specifying the -d parameter. This instructs Stampinf to use the date value that is specified by the STAMPINF_DATE environment variable. Now both Stampinf and Inf2Cat use UTC.
  • Change your driver package project settings so that Inf2Cat sets /uselocaltime. To do so, use Configuration Properties->Inf2Cat->General->Use Local Time. Now both Stampinf and Inf2Cat use local time.

When you develop your driver, you can set the environment variable PRIVATE_DRIVER_PACKAGE. When this variable is set, Stampinf sets the date and version that is used for the INF DriverVer directive to the current date and time, regardless of the command line settings. In addition, Stampinf sets the CatalogFile directive. Stampinf writes CatalogFile=delta.cat in the INF Version section, unless a catalog was already specified with the -c command option.

Type the following command in a build window to enable this development mode:

set PRIVATE_DRIVER_PACKAGE=1