CAB file generation

How do I generate a CAB file for Win10 driver submission? All I can find is that I need to do it but not how. All I can find is outdated xp info. No link to where or how to generate cab files as of now. Is this included in Windows SDK 10 or Visual Studio 2015? Are there instructions that tell me more than:

All Driver Signing submissions must be in a single, signed CAB file.

The CAB file signature must match the EV code signing certificate on file for your company with Windows Dev Center hardware dashboard. For more information about code signing certificates, see Get a code signing certificate.

Seeing references to makecab but it appears that may be outdated. Also seeing a cabdir reference but not finding it in my installation of sdk10, ddk 10, or visual studio.

Everything I see for makecab shows turning a single file into a cab. It seems I need to turn a directory into a single cab file for driver submission. Are there any current guides for this process?

xxxxx@yahoo.com wrote:

Everything I see for makecab shows turning a single file into a cab. It seems I need to turn a directory into a single cab file for driver submission. Are there any current guides for this process?

I’m not sure why there are two tools. I’ve always used “cabarc” for
this. It used to be included in the Windows SDK, although I’m not sure
it’s there any more. Assuming you have a directory layout like:

Package\xxx.inf
Package\32\xxx.sys
Package\32\yyy.ax
Package\64\xxx.sys
Package\64\yyy.ax

You can say “cabarc -r -p n submission.cab Package*”. That creates a
cabinet suitable for submission to the attestation site.

Assuming you can’t find “cabarc” anywhere, there are instructions in
MSDN on how to create a directive file for “makecab”:

https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/attestation-signing-a-kernel-driver-for-public-release

However, they don’t tell you how to generate the directory tree. Here
is the directive file that would tell makecab to do the same thing
cabarc did with one line:

.option explicit
.set CabinetFileCountThreshold=0
.set FolderFileCountThreshold=0
.set FolderSizeThreshold=0
.set MaxCabinetSize=0
.set MaxDiskFileCount=0
.set MaxDiskSize=0
.set Cabinet=on
.set Compress=on
.set CabinetNameTemplate=sub.cab
.set DestinationDir=Package
.set DiskDirectoryTemplate=.
Package\vidousb.inf
.set DestinationDir=Package\32
Package\32\xxx.sys
Package\32\yyy.ax
.set DestinationDir=Package\64
Package\64\xxx.sys
Package\64\yyy.ax


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>I’m not sure why there are two tools. I’ve always used “cabarc” for

this.
Assuming you can’t find “cabarc” anywhere, there are instructions in
MSDN on how to create a directive file for “makecab”:

https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/attestation-sig
ning-a-kernel-driver-for-public-release

Thanks. I do see makecab is a part of Windows. Not seeing cabarc in any of my sdks. The link above seems to be dead.

I did find a sample project for download within cs2015 called CSCreateCabinet. Downloading this ad building the project creates CSCreateCabinet.exe This creates a cmd window and has a ‘pack’ command that takes a directory and outputs a cab file. Hopefully this is the proper format.

Package\xxx.inf
Package\32\xxx.sys
Package\32\yyy.ax
Package\64\xxx.sys
> Package\64\yyy.ax

I do have something similar. sys, cat, and inf files within 32 and 64 directories. Is it possible to have one inf file for both 64 and 32 bit drivers? My builds generate individual files for x86 and amd64

xxxxx@yahoo.com wrote:

> Assuming you can’t find “cabarc” anywhere, there are instructions in
> MSDN on how to create a directive file for “makecab”:
>
> https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/attestation-sig
> ning-a-kernel-driver-for-public-release
Thanks. I do see makecab is a part of Windows. Not seeing cabarc in any of my sdks.

It used to be part of the “Windows Support Tools”, which was on the
installation CD as an optional component. It’s also in the tools in the
Windows 2003 Server SDK (3790).

The link above seems to be dead.

I suspect it simply got word wrapped. That needs to be one long line.
Here’s a tiny mapping: http://tinyurl.com/jp7f3au

I did find a sample project for download within cs2015 called CSCreateCabinet. Downloading this ad building the project creates CSCreateCabinet.exe This creates a cmd window and has a ‘pack’ command that takes a directory and outputs a cab file. Hopefully this is the proper format.

The open source 7zip command can read cab files. It should say Type=Cab
and Method=MSZip.

> Package\xxx.inf
> Package\32\xxx.sys
> Package\32\yyy.ax
> Package\64\xxx.sys
> Package\64\yyy.ax

I do have something similar. sys, cat, and inf files within 32 and 64 directories. Is it possible to have one inf file for both 64 and 32 bit drivers? My builds generate individual files for x86 and amd64

Sure, it’s possible. Notice that’s what I have above – the INF is at
the root, and points to the subdirectories. However, the standard
driver project templates don’t support this; they need one build to map
to one package. So, I don’t use the “Package” project. I have the main
project build the binaries, then I have a script to collect the parts
and make a package out of it. You just need to specify the
subdirectories like this:

[SourceDisksFlles.x86]
xxx.sys=1,\32
yyy.ax=1,\32

[SourceDisksFiles.amd64]
xxx.sys=1,\64
yyy.ax=1,\64

And, of course, have separate Model sections for the two platforms:

[Manufacturer]
%Mfr%=MyInstaller,NTamd64

[MyInstaller]
… 32 bit …

[MyInstaller.NTamd64]
… 64 bit …


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.