How to make a working .CAT file

Forum for anything else which doesn't fit in the above forums. Site feedback, random talk, whatever, are welcome.
Post Reply
User avatar
vmanda
Posts: 1634
Joined: Wed Apr 18, 2007 12:25 pm
Location: TM.Romania

How to make a working .CAT file

Post by vmanda » Wed Aug 05, 2009 8:03 am

I want to use DPInst.exe to install some nonPnP drivers.
DPinst wants drivers to be digitaly signed drivers else she fails.
What is the simple way to digitaly sign drivers presuming that I have the inf ksbus.inf and one sys KSBus.sysfile?
ksbus.inf wrote:[Version]
Signature="$WINDOWS NT$"
Class=System
ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider=%KERNSAFE%
DriverVer=02/07/2005, 1.00.0000
CatalogFile =KSBus.cat

[DestinationDirs]
DefaultDestDir = 12

[SourceDisksNames]
1 = %DiskId1%,,,""

[SourceDisksFiles]
ksbus.sys = 1,,

[Manufacturer]
%StdMfg%=Standard,NTamd64

[Standard]
%Bus.DeviceDesc%=Bus_Device, root\ksbus

[Standard.NTamd64]
%Bus.DeviceDesc%=Bus_Device_amd64, root\ksbus

[Bus_Device.NT]
CopyFiles=%windir%\system32\drivers


[Drivers_Dir]
ksbus.sys

[Bus_Device_amd64.NT]
CopyFiles=Drivers_Dir_amd64


[Drivers_Dir_amd64]
ksbus64.sys

[Bus_Device.NT.Services]
AddService = ksbus,%SPSVCINST_ASSOCSERVICE%, bus_Service_Inst

[Bus_Device_amd64.NT.Services]
AddService = ksbus,%SPSVCINST_ASSOCSERVICE%, bus_Service_Inst_amd64

[bus_Service_Inst]
DisplayName = %bus.SVCDESC%
ServiceType = 1
StartType = 0
ErrorControl = 1
ServiceBinary = %12%\ksbus.sys
LoadOrderGroup = Boot Bus Extender

[bus_Service_Inst_amd64]
DisplayName = %bus.SVCDESC%
ServiceType = 1
StartType = 0
ErrorControl = 1
ServiceBinary = %12%\ksbus64.sys
LoadOrderGroup = Boot Bus Extender

[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
KERNSAFE = "KernSafe Technologies"
StdMfg = "System Bus Extension"
DiskId1 = "System Bus Installation Disk #1"
Bus.DeviceDesc = "KernSafe Virtual System Bus"
bus.SVCDESC = "KernSafe Virtual System Bus"
Trying to use MakeCat.Exe I have write the following cdf file.
KSBus.cdf wrote: [CatalogHeader]
Name=KSBus.cat
PublicVersion=0x0000001
EncodingType=0x00010001
CATATTR1=0x10010001:OSAttr:2:6.0
[CatalogFiles]
ksbus.inf=ksbus.inf
KSBus.sys=KSBus.sys
MakeCat.Exe make one cat file, but DPInst still says that' unsigned driver.
Microsoft's samples are verry poor.

I have tried also to use inf2cat but constanly refuse to make anything saying that's one error.

Samebody ideeas?

NOTE: the files make part from KernSafe TotalMounter free virtual CD/DVD-ROM/RW/RAM emulator.
The original inf allready contains one error
[SourceDisksFiles]
dsbus.sys = 1,, <---- KSBus.sys
so no work silent.(TotalMounter.exe /S)

User avatar
mr_smartepants
Posts: 824
Joined: Thu May 18, 2006 5:56 am
Location: Cambridgeshire, UK

Post by mr_smartepants » Wed Aug 05, 2009 12:20 pm

You could use dpinst.exe with the /LM switch (legacy mode, uses unsigned drivers).
Use the dpinst.exe /? to see a list of all the switches.
Image
Some heroes don't wear capes, they wear Kevlar and dog-tags!

User avatar
vmanda
Posts: 1634
Joined: Wed Apr 18, 2007 12:25 pm
Location: TM.Romania

Post by vmanda » Wed Aug 05, 2009 5:22 pm

Ok, thanks for help.

But question about how to make .cat's remain.

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Sun Aug 09, 2009 12:16 pm

There has to be a chain of trust from one of the root certificates in order for a certificate to be trusted. Unless you want to pay several hundred bucks for a code signing certificate, what you need to do is create your own root certificate, install that into the system, and then use that to sign the certificate used to sign your code.
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

User avatar
vmanda
Posts: 1634
Joined: Wed Apr 18, 2007 12:25 pm
Location: TM.Romania

Post by vmanda » Sun Aug 09, 2009 1:02 pm

I really don't know anything about certificate creation , etc. I will check on msdn, when I have enough time to learn about this.

Thanks verry much.

Post Reply