Command-line arguments for package generator

The package generator tool (PkgGen.exe) is used to create a package from a package project XML file. The tool is designed to process one project XML file at a time and by default is located at %WPDKCONTENTROOT%\Tools\bin\i386. The following section outlines the command-line arguments.

Warning  

Package generation requires catalog files to be signed. To perform this task, a certificate must be specified for use with pkggen.exe. If a certificate is not provided, usage of pkggen.exe will return the following error message: Failed to sign package integrity catalog file. To specify a signing certificate for pkggen.exe, follow the steps in Set up the signing environment and Sign binaries and packages.

Usage

PkgGen [Project File] [Options] /config:[Configuration File]

Note  

When using the package generator tool, make sure to use quote marks for input paths that contain spaces. For example, if you defined a %WPDKCONTENTROOT% environment variable that is set to C:\Program Files (x86)\Windows Kits\10, then the invocation of package generator should be "%WPDKCONTENTROOT%\tools\bin\i386\pkggen.exe" with a leading and ending quote mark. This guidance should also be followed for the path to the project file and the configuration file. For any parameter values, such as variables, that start with the /<param_name>: syntax make sure to quote the entire string after the : symbol if there are any spaces. An example would be /variables:"WPDKCONTENTROOT=C:\Program Files (x86)\Windows Kits\10;MyVar=TestValue".

Name Description Usage

[Project File]

Path to the project XML file.

Required

/output:[Output Directory]

Specifies the output directory for the processed package. By default this value is ".", meaning the current directory.

Optional

/version:[Version String]

Specifies the version of the package using the format "<major>.<minor>.<hotfix>.<build>". By default this value is "0.0.0.0". Note: The version field must be incremented whenever a package is changed.

Optional

/build:[Build Type]

Specifies the build type of the operating system image the package is being created for (FRE or CHK). By default FRE is used.

Optional

/cpu:[CPU Type]

Specifies the platform CPU type for the package (ARM or x86). By default, ARM is used.

Optional

/language:[Language ID List]

Specifies a list of ";" separated language identifiers for which language packages should be generated. By default this list is empty.

Optional

/resolution:[Resolution ID list]

Specifies a list of ";" separated resolution identifiers for which resolution packages should be generated. By default this list is empty.

Optional

/config:[Configuration File]

Specifies the path to the global macro file PkgGen.cfg.xml that is included with the Windows Driver Kit (WDK). By default, this file is located at %ProgramFiles(x86)%\Window Kits\10\Tools\bin\i386 (or the corresponding path under %ProgramFiles% on computers running a 32-bit version of Windows).

Required

/variables:[Variable Definition List]

Specifies additional variables for use during package project file processing. The format is "[variable name]=[value];[variable 2 name]=[value];".

Optional

{+|-}diagnostic

Precede with either "+" or "-" to indicate true or false. This option enables debugging messages, which are disabled by default. Syntax for enabling debugging messages would be +diagnostic.

Optional

{+|-}compress

Precede with either "+" or "-" to indicate true or false. The default is false. This value allows for the compression of the package. When compress is true, the package generator tool run time increases, but the package is optimized for storage size. This setting has no impact on imaging.

Optional