You can create a catalog file in Windows 10 primarily using two command-line tools: Inf2Cat for driver packages and MakeCat for more general purposes using a Catalog Definition File (.cdf).
Catalog files (.cat
) are digital signatures that ensure the integrity and authenticity of a set of files, commonly used for driver packages to verify they haven't been tampered with.
Using Inf2Cat for Driver Packages
The Inf2Cat tool is specifically designed to create catalog files for driver packages. This is the most common method when dealing with device drivers.
How it Works
Inf2Cat processes a driver package's INF file and generates a catalog file containing hashes of all files listed in the INF's [SourceDisksFiles]
and [DestinationDirs]
sections. This catalog file can then be digitally signed.
Steps to Use Inf2Cat
-
Open Command Prompt or PowerShell as Administrator. You typically need administrative privileges to run these tools.
-
Navigate to the directory containing your driver package's INF file.
-
Run the
Inf2Cat
command. The basic syntax requires specifying the INF file, the operating system version, and the catalog file name.-
Example Syntax:
Inf2Cat /driver:<path_to_your_driver_folder> /os:10_x64 /verbose
Or, if the INF is in the current directory:
Inf2Cat /inf:<your_driver>.inf /os:10_x64 /verbose
-
Explanation of Parameters:
/driver:<path>
: Specifies the path to the top-level directory of the driver package. Inf2Cat will search for the INF file within this directory and its subdirectories./inf:<file>
: Specifies the path and filename of the INF file directly. Use this if the INF is not in the/driver
path or you want to be specific./os:<version>
: Specifies the target operating system version. For Windows 10 64-bit, use10_x64
. For 32-bit, use10_x86
. Other versions likeServer_10_x64
are also available./verbose
: (Optional) Displays detailed information about the catalog creation process./noautocat
: (Optional) Prevents Inf2Cat from automatically naming the catalog file based on the INF file name. You would then typically use/cat
to specify the name./cat:<filename>
: (Optional) Specifies the name of the catalog file to create when using/noautocat
.
-
-
Verify the Output. Inf2Cat will generate the catalog file (e.g.,
your_driver.cat
) in the specified directory.
When to Use Inf2Cat
- When preparing a driver package for code signing.
- As part of a build process for device drivers.
Using MakeCat with a Catalog Definition File (.cdf)
The MakeCat tool provides a more flexible way to create catalog files by using a Catalog Definition File (.cdf). This method is suitable for cataloging arbitrary sets of files, not just driver packages.
How it Works
MakeCat reads instructions from a .cdf text file that you create manually. The .cdf file lists the files to be included in the catalog and other relevant information. MakeCat then generates the catalog file based on these definitions.
Steps to Use MakeCat
-
Create a Catalog Definition File (.cdf). This is a plain text file (e.g.,
mycatalog.cdf
) that defines the structure and content of your catalog.-
Basic .cdf Structure Example:
[CatalogHeader] Name=mycatalog.cat PublicVersion=1.0 EncodingType=3 [CatalogFiles] <HASH>file1.dll=file1.dll <HASH>file2.sys=file2.sys <HASH>file3.exe=file3.exe
-
Explanation:
[CatalogHeader]
: Section for catalog metadata.Name
: The desired name for the output catalog file.PublicVersion
: A version number for the catalog.EncodingType
: Specifies the encoding (typically 3 for UTF-8).
[CatalogFiles]
: Section listing the files to include.<HASH>filename=filepath
: For each file, specify<HASH>
followed by the name used within the catalog (often just the filename) and the path to the actual file.
-
-
Open Command Prompt or PowerShell.
-
Navigate to the directory where you saved the .cdf file.
-
Run the
MakeCat
command. Specify the path to your .cdf file.- Example Syntax:
MakeCat mycatalog.cdf
- Example Syntax:
-
Verify the Output. MakeCat will generate the catalog file (e.g.,
mycatalog.cat
) in the same directory as the .cdf file.
When to Use MakeCat
- When you need to create a catalog for a software package that is not a standard driver package.
- When you need fine-grained control over which files are included in the catalog or their representation within the catalog structure.
Finding the Tools
Both Inf2Cat
and MakeCat
are part of the Windows Software Development Kit (SDK) or Windows Driver Kit (WDK). You will need to install either the SDK or WDK to get these tools. They are typically found in the bin
directory of the installed kit (e.g., C:\Program Files (x86)\Windows Kits\10\bin\<architecture>\<build_version>
). You may need to open a "Developer Command Prompt" or "Windows Driver Kit Command Prompt" to have the paths to these tools automatically configured.
Summary Table: Inf2Cat vs. MakeCat
Feature | Inf2Cat | MakeCat |
---|---|---|
Primary Use | Driver packages (.inf) | General files, software packages |
Input | INF file (or driver folder) | Catalog Definition File (.cdf) |
Ease of Use | Simpler for standard driver cases | Requires manual .cdf creation |
Flexibility | Limited to INF-defined files | Highly flexible via .cdf |
Common Scenario | Signing drivers | Signing non-driver software |
Choosing the right tool depends on what you intend to catalog. For driver packages, Inf2Cat is the standard and recommended tool. For custom or non-driver file sets, MakeCat offers the necessary flexibility.