How do i install a driver that is not microsoft certified???


I try use the pnp drivers template but not sucess.
Here's what im doing
After i install the template(msi) with the unsigned drivers a popups appears asking me if i want to install the unsigned driver
If i press yes the driver is installed
Then i connect the device(hardware) and the popups comes one more time asking me if i want to install the unsigned driver

Is there any way to remove this dialog box so the driver gets installed no matter what
And also that the box does not appear then connecting the hardware

Any suggestion folks??
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
What kind of hardware are we talking about?
Answered 10/05/2006 by: AngelD
Red Belt

Please log in to comment
0
The Hardware is a Casio DT-X10M10E(PDA-Scanner)
Connecting by usb-cable


Hope this help
Answered 10/05/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
How do i install NOT PNP drivers?
If the hardware is usb connected then that would make it a PNP device.

Have a look at the links at PNP Device Driver.
You can use INF2CAT to create a .CAT file and you will have to sign this with either a existing certificate or create one.
Inf2Cat.exe /driver:"<Path to driver files>" /os:XP_X86 /verbose
Step-by-Step Guide to Device Driver Signing and Staging
Authenticode will work on Windows XP even it Microsoft not state this.

This should solve the issue with the hardware wizard.
Answered 10/06/2006 by: AngelD
Red Belt

Please log in to comment
0
Thx for all the the help AngelD, but i think i need a bit more explaining

I have used the the INF2cat to create the catalog file!! But how do i sign this
Sorry but i have never done this before

You also wrote sign this with a exsisting certificate or create a new one!!!
Since the customer is not the same company i work. What do you suggest. Is it best to create a new one or using a exsisting one.



Sorry if my question is really stupid. But im kind of new to this so ....................
Answered 10/06/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
1
If your customer has a certificate then ask them to use that or if they can create one to be used for all their device driver packages.

Required tools bellow can be found in “Microsoft Platform SDK”.
To create an authenticode certificate with MakeCert.Exe and Cert2Spc.Exe use:
1. MakeCert.Exe -r -pe <path to .cer file> -n CN=<certificate name> -sv <path to .pvk file> -len 2048
2. Choose password for the private key
3. Cert2Spc.Exe <path to .cer file> <path to .spc file>

To sign the catalog file (.cat) use:
signcode.exe -spc <path to spc file> -v <path to pvk file> -t http://timestamp.verisign.com/scripts/timstamp.dll <Path to catalogfile>
Answered 10/06/2006 by: AngelD
Red Belt

Please log in to comment
0
Im not to familar with the certificates!!

But does the certificates need to be at the customer server's????
I thought it was possible to distribute the packagee with the certificate by sms. Am i wrong here??
But the certificate must maybe be trusted by the company or......

If the cerrtificate may be trusted by the company i guess this solution to use a certificate may not be the best solution
Any other suggestion of how to do it


Thx for all the answers AngelD
Answered 10/08/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
1
It's not required, but if the customer has a certificate server and this certificate is distributed through the server to for clients you wouldn't have to "install" the certificate through your package.

Command line to add a certificate which you could use through a custom action.
CertMgr.Exe -add "Certificate.cer" -s -r localMachine ROOT

Certificate Manager Tool (Certmgr.exe)
Answered 10/09/2006 by: AngelD
Red Belt

Please log in to comment
0
I still have some problems to make a cer fil

AngelD Wrote:
To create an authenticode certificate with MakeCert.Exe and Cert2Spc.Exe use:
1. MakeCert.Exe -r -pe <path to .cer file> -n CN=<certificate name> -sv <path to .pvk file> -len 2048
2. Choose password for the private key
3. Cert2Spc.Exe <path to .cer file> <path to .spc file>

First let me say that i dont excatly know what this cmd file does but this is the message i get

C:\Program Files\Microsoft.NET\SDK\v2.0>MakeCert.Exe -r -pe D:\Ongoing\IRXPressU
SBIrDA\Drivere -n CN=WWCert -sv D:\Ongoing\IRXPressUSBIrDA\Drivere\WWCert.pvk -l
en 2048
Error: WriteFile failed => 0x5 (5)
Failed

2. Im able to choose a password for the private key but the i get asked to enter the private key= then is then i get this error message.

Hope you can explain a bit more in detail


If you also have a package where you have done this i would like to see it-because i can't see how this driver is installed automaticlly when i connect the hardware(rememver the driver is not passed microsoft logo testing)
What is a pvk file by the way
Answered 10/09/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
MakeCert.Exe -r -pe "D:\temp with space\WWCert.cer" -n CN=WWCert -sv "D:\temp with space\WWCert.pvk" -len 2048
Cert2Spc.Exe "D:\temp with space\WWCert.cer" "D:\temp with space\WWCert.spc"

What is a pvk file by the way
Private Key
Answered 10/09/2006 by: AngelD
Red Belt

Please log in to comment
0
FYI
Using this procedure creates a "Test Certificate" but it will work as all "certificate purposes" are used.
Answered 10/09/2006 by: AngelD
Red Belt

Please log in to comment
0
Thx AngelD foreverything so far......

So far i have - let me rather put it you have created the certificate
Signed it with the catalog file

If i know try to run the command

CertMgr.Exe -add "Certificate.cer" -s -r localMachine ROOT

The certificate gets added, but if i connect the printer the hardware wizard still popsup with driver not signed

Why???
Should it not work know
Answered 10/09/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
You havn't installed the drivers to the "%SystemRoot%\system32\DRVSTORE" yet.
Create an msi to install the driver(s) using DIFxApp merge module.

If you want to test without having a custom action to add the certificate then just run CertMgr.Exe -add "Certificate.cer" -s -r localMachine ROOT before the msi installation.

Then login with a regular user and see the drivers get installed.
Have a look at http://itninja.com/question/how-do-you-roll-out-new-machines?0827 for more details.

Make sure to set the Flags column with a value of "7" in the MsiDriverPackages table for each component/driver entry in this table.
Answered 10/09/2006 by: AngelD
Red Belt

Please log in to comment
0
Hmmmmm

I have made a msi file where i have only included the drivers

Let my first say im using Wise

This drivers i have deployd to a catalog named c:\program files\drivers
So this drivers catalog contains a inf file and a sys file.
I might be wrong here but need i deploy the *.inf and *.sys file to the most righfull folder-etc c:\windows\inf and c:\windows\system32\drivers???

Ive also included the merge modul!!!

I used the sys file as keypath!!!

Under MsiDriverPAckage i added this one component and set the flagcolum to 7
Why 7- haven't i signed the drivers??

Then i install the certificate you made for me

The i compile and installed the package.
Under the installation the wizard pops up saying driver not signed. So i have to press yes here to continue
I guess the certificate should have solved this

Then i connect the HW and the wizard comes up and i i have to do it all over


If im following the wizard and then check device manager i see 2 driver files
1 is signed and the package sys file is NOT signed.
Shouldn't this be signed know. Thought i did this

Since the device also using a signed driver should i made the certificate with this driver also???

I desperatly need som more help here m8[:@
Answered 10/10/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
You missed to add the .cat file to the same folder as the .inf and .sys file.
So the files you will have to install will be: .inf, .sys and the .cat file.

The .inf file must be set as the keypath for the component holding these three files.
Add the DIFxApp.msm if not already done.

Go to the Setup Editor view and select the components tab.
You should have one component here fromout adding the files from the Installation Expert view.
Expand this component until you see the Files source tree look alike ;) (couldn't give you a better name). On the right you will see the driver "related" files.
Right-click the .inf file as set as key.

Richt-click the .inf file and select Details and go to the Driver tab.
Mark the "Use DIFxApp to....".
Un-check all of the "DIFxApp Installation Options", this will set the Flags column to 7 in the MsiDriverPackages table.
If you do not un-check "Retain better-matchine PnP function drivers." the unsigned driver already installed on the client will be used instead of this one we have signed.

A little note: after done the settings in the Driver tab and clicking OK and you suddenly want to rename the component these settings will be discarded. In this case you will need to go to the Driver tab and redo the settings again.

Hope the hero will win in the end of this story ;)
Answered 10/10/2006 by: AngelD
Red Belt

Please log in to comment
0
I might be wrong here but need i deploy the *.inf and *.sys file to the most righfull folder-etc c:\windows\inf and c:\windows\system32\drivers???
No, this is done by the DIFxApp merge module.
Answered 10/10/2006 by: AngelD
Red Belt

Please log in to comment
0
Ok

I have done exatly as you said!!

1. I made a msi file containing the sys,inf and the cab files at c:\program files\drivers

2.I added the DifxAPP merge module

I have one component where i put the *.inf file as key
Then right clik the inf file and marked the "Use DifxApp..." And uncked all of th other
Should this only be done for this file or the cab and the sys file also-but not the key file thing

Then i installed the certificate.
After this i installed the msi file but neighter the inf and sys file is copid to the windows folder!!!

Im doing this from home now so the hardware is plugged in, not sure if that can be problem

And by the way if we solve this im not the hero-y are:-)
Answered 10/10/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
Just to verify!

Look in the .inf file and find the SorceDiskFiles section.
Did you add all of these files listed in this section + the .inf and the newly created .cat (not .cab) to the msi?

The drivers (files) will be copied to it's representive folders during hardware wizard, that is when you plug in the usb hardware.
Test by not having the hardware plugged in and install the package.
When the installation has finished log in with a regular user and plugin the PDA-Scanner.
If it doesn't work have a look in the "%windir%\setupapi.log" for driver installation failure, should be located near the end of the file.
Answered 10/10/2006 by: AngelD
Red Belt

Please log in to comment
0
First let me say i think we are close to a solution[:D]

Then i installed the certificate and the driver-package-the new harware wizard did not pop up-yohooo
But the device got installed with wrong driver so its not working[:@]

If i check the inf-file uder
[SourceDisksFiles] ; floppy only
kcirnet.sys = 1 ; floppy only
kclk.sys = 1


Well i got the kcirnet.sys- file but the other file i dont can't find...

Then i connected the hardware it got installed but with a different driver
c:\windows\system32\drivers\irenum.sys

The driver kcirnet.sys is not copyid to c:\windows\system32\drivers

Any idea why???

Heres is the log for setupapi.log
2006/10/11 09:13:24 708.3 Driver Install]
#-019 Searching for hardware ID(s): usb\vid_050f&pid_0180&rev_0110,usb\vid_050f&pid_0180
#-018 Searching for compatible ID(s): usb\class_fe&subclass_02&prot_00,usb\class_fe&subclass_02,usb\class_fe
#-198 Command line processed: C:\WINDOWS\system32\services.exe
#I022 Found "USB\VID_050f&PID_0180" in C:\WINDOWS\inf\oem8.inf; Device: "CASIO IRXpress USB Infrared"; Driver: "CASIO IRXpress USB Infrared"; Provider: "CASIO Computer Co.,"; Mfg: "CASIO Computer Co.,"; Section name: "KC180".
#I023 Actual install section: [KC180]. Rank: 0x00000001. Effective driver date: 11/04/2002.
#I393 Modified INF cache "C:\WINDOWS\inf\INFCACHE.1".
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [KC180] in "c:\windows\inf\oem8.inf".
#I320 Class GUID of device remains: {6BDD1FC5-810F-11D0-BEC7-08002BE2092F}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-166 Device install function: DIF_INSTALLDEVICEFILES.
#I124 Doing copy-only install of "USB\VID_050F&PID_0180\5&2B36232&0&1".
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [KC180.Interfaces] from "c:\windows\inf\oem8.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "USB\VID_050F&PID_0180\5&2B36232&0&1".
#-035 Processing service Add/Delete section [KC180.Services].
#E339 Add Service: Binary "C:\WINDOWS\system32\DRIVERS\kcirnet.sys" for service "KCIRNET" is not present.
#E032 Error 0xe0000217: A service installation section in this INF is invalid.
#E275 Error while installing services. Error 0xe0000217: A service installation section in this INF is invalid.
#E122 Device install failed. Error 0xe0000217: A service installation section in this INF is invalid.
#E154 Class installer failed. Error 0xe0000217: A service installation section in this INF is invalid.
[2006/10/11 09:13:28 2620.2]
#-199 Executing "C:\WINDOWS\system32\rundll32.exe" with command line: rundll32.exe newdev.dll,ClientSideInstall \\.\pipe\PNP_Device_Install_Pipe_0.{75286C69-0715-4995-A35C-357212DA9E69}
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_050f&pid_0180&rev_0110,usb\vid_050f&pid_0180
#-018 Searching for compatible ID(s): usb\class_fe&subclass_02&prot_00,usb\class_fe&subclass_02,usb\class_fe
#I022 Found "USB\VID_050f&PID_0180" in C:\WINDOWS\inf\oem8.inf; Device: "CASIO IRXpress USB Infrared"; Driver: "CASIO IRXpress USB Infrared"; Provider: "CASIO Computer Co.,"; Mfg: "CASIO Computer Co.,"; Section name: "KC180".
#I023 Actual install section: [KC180]. Rank: 0x00000001. Effective driver date: 11/04/2002.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [KC180] in "c:\windows\inf\oem8.inf".
#I320 Class GUID of device remains: {6BDD1FC5-810F-11D0-BEC7-08002BE2092F}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of "USB\VID_050F&PID_0180\5&2B36232&0&1".
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [KC180.Interfaces] from "c:\windows\inf\oem8.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "USB\VID_050F&PID_0180\5&2B36232&0&1".
#-035 Processing service Add/Delete section [KC180.Services].
#E339 Add Service: Binary "C:\WINDOWS\system32\DRIVERS\kcirnet.sys" for service "KCIRNET" is not present.
#E032 Error 0xe0000217: A service installation section in this INF is invalid.
#E275 Error while installing services. Error 0xe0000217: A service installation section in this INF is invalid.
#E122 Device install failed. Error 0xe0000217: A service installation section in this INF is invalid.
#E154 Class installer failed. Error 0xe0000217: A service installation section in this INF is invalid.
#I060 Set selected driver.
#I125 Installing NULL driver for "USB\VID_050F&PID_0180\5&2B36232&0&1".
#I121 Device install of "USB\VID_050F&PID_0180\5&2B36232&0&1" finished successfully.

The error message i get is
a service installation section in this inf file is invalid

Maybe 1 more thing i should mention when i signed the cat file i used the signtool wiz.
Could i use this tool in a wrong way

By the way i used the *.cat file not *.cab file:-)

In wise:I should only add the DIFFxAPP.msm module right. Or is there something more i must do to make it work???
Answered 10/10/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
Here is the inf file


; Copyright(c) All Rights Reserved. 2002 KC Technology, Inc.
;;
;;
;; IRXpress
;;
;;modify for casio on 11/14/2002
[Version]
Signature = "$Windows NT$"
Provider = %KCIR%
Class = Infrared
ClassGUID = {6bdd1fc5-810f-11d0-BEC7-08002BE2092F}
DriverVer = 11/04/2002, 2.11.04.1
CatalogFile = kcir.cat

[SourceDisksNames] ; floppy only
1 = %MediaDescription%,, ; floppy only

[SourceDisksFiles] ; floppy only
kcirnet.sys = 1 ; floppy only
kclk.sys = 1


[DestinationDirs]
;
; Specify destination directories for groups of files.
; '12' indicates the Windows drivers directory.
; '17' indicates the Windows Inf directory.
;
DefaultDestDir=12

[KCIR_CopySys]
;
; This section lists the source and destination names of files that need
; to be copied to the user's drive. The destination directory is given
; in the [DestinationDirs] section above.
;
kcirnet.sys,,,2 ; Do not Skip File
kclk.sys,,,2 ; Do not Skip File


[Manufacturer]
;
; Specify a name and devices section for each supported manufacturer that
; makes products of this class.
;
%KCIR% = KCTechnology

[KCTechnology]
%USB\VID_050f&PID_0180.DeviceDesc%=KC180, USB\VID_050f&PID_0180
%USB\VID_09C4&PID_0011.DeviceDesc%=KC180, USB\VID_09C4&PID_0011
%USB\VID_C409&PID_0001.DeviceDesc%=KC180, USB\VID_C409&PID_0001


[KC180]
DelReg = KC180_DelReg
AddReg = KC180_AddReg,*KC180_AddReg,Speed_Addreg,Help_AddReg
BusType = 15
Characteristics = 0x4 ; NCF_PHYSICAL
;CopyFiles = KCIR_CopySys ;auto install

[KC180.Services]
AddService= KCIRNET, 2, KCIRNET.AddService, common.EventLog

[KC180.Coinstallers]
DelReg=KC180_DelCoinstallers




[KC180_AddReg]
; Interfaces
HKR, Ndi, Service, 0, "IRXpress"
HKR, NDI\Interfaces, DefUpper, 0, ndisirda
HKR, NDI\Interfaces, UpperRange, 0, ndisirda
HKR, Ndi\Interfaces, DefLower, 0, nolower
HKR, Ndi\Interfaces, LowerRange, 0, nolower
HKR, Ndi, RequiredAll, 0, "MS_IrDA"

[*KC180_AddReg]
HKR,,BoardType,0,"3"
HKR,NDI\params\MaxConnectRate,default,,"4000000"


[Speed_Addreg]
;
;
HKR,NDI\params\MaxConnectRate,ParamDesc,,%MaxConnectRate%
HKR,NDI\params\MaxConnectRate,type,,enum
HKR,NDI\params\MaxConnectRate\enum,"4000000",,"4000000 bps"
HKR,NDI\params\MaxConnectRate\enum,"115200",, " 115200 bps"
HKR,NDI\params\MaxConnectRate\enum,"57600",, " 57600 bps"
HKR,NDI\params\MaxConnectRate\enum,"38400",, " 38400 bps"
HKR,NDI\params\MaxConnectRate\enum,"19200",, " 19200 bps"
HKR,NDI\params\MaxConnectRate\enum,"9600",, " 9600bps"

[Help_Addreg]
HKR,NDI,HelpText,0,%IRMINI_HELP%

[KC180_DelReg]
HKR,,EnumPropPages32

[KC180_DelCoinstallers]
HKR,,CoInstallers32

[KCIRNET.AddService]
DisplayName = %KCIrExpress.ServiceDesc%
ServiceType = 1 ; %SERVICE_KERNEL_DRIVER%
StartType = 3 ; %SERVICE_DEMAND_START%
ErrorControl = 1 ; %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\kcirnet.sys ;12=drivers directory
LoadOrderGroup = NDIS

[common.EventLog]
AddReg = common.AddEventLog.reg

[common.AddEventLog.reg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
HKR, , TypesSupported, 0x00010001, 7



[Strings]
;
; This section defines symbolic string constants for use in the rest
; of the .inf script. You should create and use symbols for all
; translatable strings in order to make localization easier.
; Also, spaces within strings elsewhere in the script confuse infedit.exe;
; so use symbolic constants for any multi-word strings.
;
MediaDescription = "IRXpress Installation Disk"

IRMINI_HELP="IRXpress Infrared Port. It can be used to establish wireless serial and network links to other computers and devices."
KCIrExpress.ServiceDesc="CASIO Device Driver"
USB\VID_050f&PID_0180.DeviceDesc = "CASIO IRXpress USB Infrared"
USB\VID_09C4&PID_0011.DeviceDesc = "IRXpress USB Infrared Device"
USB\VID_C409&PID_0001.DeviceDesc = "IRXpress USB Infrared Device"

V_CLASSNAME="Infrared adapters"
KCIR="CASIO Computer Co.,"
MaxConnectRate="Maximum Connect Rate"
Answered 10/11/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
All files under the "[SourceDisksFiles]" section is required, otherwise INF2CAT will fail to create the .CAT file.
Did these kclk.sys file not exist?

As the file "kcirnet.sys" is not copied the service "KCIRNET" will not be created by AddService action in the "[KC180.Services]" section.
This will log the #E339 Add Service: Binary "C:\WINDOWS\system32\DRIVERS\kcirnet.sys" for service "KCIRNET" is not present..

Have a look under the "[KC180]" section.
Remove the remark of the CopyFiles (;CopyFiles = KCIR_CopySys ;auto install) action.
The line should look like:
CopyFiles = KCIR_CopySys ;auto install
Answered 10/11/2006 by: AngelD
Red Belt

Please log in to comment
0
[:)][:)][:)][:)][:)][:)][:)]

First let me say i did not see that
CopyFiles = KCIR_CopySys ; auto install was remarked

Removed the the mark
and since i dont have kcl.sys i also removed everything about this file from the inf file.

I then made a new cat file(guess i have to do it-since i have changed the inf file)
Signed the cat fil to my certificate.

Installed the certificate
Installed the msi file


Logge in as a "standard" user
Plugged in the hardware


And guess what
IT FINALLY WORKS

So now i just i need to get the certficate installed in a custom action
Do i need to make 2 msi files, one who installs the certficate ant the other installing the drivers
IF NO- where do set the install certificate action???
Answered 10/11/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
6
You don't need a second MSI to install the certificate.
Add the .cer file to your package into a shared folder (ex. WINDOWS\System32)
Add a custom action executed after InstallFiles action with the condition "Not Installed".
The ca should execute: CertMgr.Exe with the parameters: -add "[#WWCert.cer]" -s -r localMachine ROOT.

I would use a Custom Action Type 2 (EXE file stored in a Binary table stream).
Answered 10/12/2006 by: AngelD
Red Belt

Please log in to comment
0
[font="Microsoft Sans Serif"]YES - IT WORKS [font="Microsoft Sans Serif"]

Thx for all the help Angeld - you truly are an angel
Answered 10/12/2006 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
Very informative answers AngelD and fully deserving of a +2 rating for sheer patience alone.[:)]

MÃ¥nga tak

Spartacus
Answered 10/12/2006 by: spartacus
Black Belt

Please log in to comment
0
HAHA... you almost got it Spartacus, thx for the rate!

Tack så mycket [:D]
Answered 10/12/2006 by: AngelD
Red Belt

Please log in to comment
2
ORIGINAL: AngelD

I might be wrong here but need i deploy the *.inf and *.sys file to the most righfull folder-etc c:\windows\inf and c:\windows\system32\drivers???
No, this is done by the DIFxApp merge module.

To correct myself:
The DIFxApp Merge Module will add the drivers to "%WINDIR%\System32\DRVSTORE".
The Hardware Wizard till install the drivers to "%WINDIR%\inf" and "%WINDIR%\System32\drivers" if related driver files exist as there can exist just .inf files that do not require any DLL, SYS, VXD... files.
Answered 10/12/2006 by: AngelD
Red Belt

Please log in to comment
0
I have followed the advise in this thread. I am coming up with a problem with installing the cert. It seems that the cert custom action is running before the cert is installed to the computer. I do have the custom action after InstallFiles in the Exec. Immediate. Does anyone know why that would be? I know this must be a simple answer, but I haven't worked a lot in the msi Script part of packages that I have done in the past. Please let me know what I can do.

Thank you in advance.
John
Answered 03/22/2007 by: johndsummers
Senior Yellow Belt

Please log in to comment
0
Hi John,
I think you should sequence the cert CA as Deferred in System Context. Assuring this way the files are been really installed before the CA starts.
Hope it helps

KrisBcn
Answered 03/22/2007 by: KrisBcn
Purple Belt

Please log in to comment
0
In AngelD's response earlier, he stated the below


Richt-click the .inf file and select Details and go to the Driver tab.
Mark the "Use DIFxApp to....".
Un-check all of the "DIFxApp Installation Options", this will set the Flags column to 7 in the MsiDriverPackages table.
If you do not un-check "Retain better-matchine PnP function drivers." the unsigned driver already installed on the client will be used instead of this one we have signed.

I don't see a drivers tab in WPS 5.5. Is there suppose to be one there? Maybe that is why I am having issues with my install.

I did move the cert install to the Execute Deferred but it fails the install stating that the driver couldn't be verified. The Cert didn't get installed yet. So, it is trying to load the driver before the cert is installed. But the custom action is trying to install the cert before the files for the cert are put on the machine. I have tried to move the dll call to the msiDriverspackage in Execute immediate but then I just get an error of 2726.

I see earlier that they talked about a standard user logged in and the drivers added. I am working on a USB device that when I can get things to work (manual cert add), it will still state that a local admin has to install the device drivers.

John
Answered 03/22/2007 by: johndsummers
Senior Yellow Belt

Please log in to comment
0
Make sure your custom action that installs the certificate is sequenced between the InstallFiles and MsiProcessDrivers actions. The MsiProcessDrivers action is added by the DIFxApp.msm.
If you don't see the Driver tab then it could be due to not added the DIFxApp merge module or you didn't set the .inf file as keypath for the component.
Answered 03/22/2007 by: AngelD
Red Belt

Please log in to comment
0
I have the cert installation working now.

I have decided to do two MSI files since I can't get the cert and diffxapp to work together. I have done everything everyone has suggested here and as soon as the diffxapp MM is added to the msi, it will fail. If I have them split, it works.

I have added and started from scratch a couple of times and the results are the same. In wise package studio, I don't get the Drivers tab when I go to Components and double click on the key file *.inf. No driver tab.

It seems the drivers want to install before the cert is installed. I have the cert in Execute Defered and the msi drivers are in Execute Immediate. I tried to move the msi drivers to the defered section and I then get an msi error 2726.

I thank everyone who has tried to help me with this. Thank you.

John Summers
Answered 03/23/2007 by: johndsummers
Senior Yellow Belt

Please log in to comment
0
I will continue on this old thread.

With InstallShield 6 I made a new ism file which installs a driver. In the MSI log file I see:

MSI (s) (D0:10) [14:45:16:282]: Executing op: ActionStart(Name=MsiRollbackInstall,,)
Action 14:45:16: MsiRollbackInstall.
MSI (s) (D0:10) [14:45:16:282]: Executing op: CustomActionSchedule(Action=MsiRollbackInstall,ActionType=3329,Source=BinaryData,Target=RollbackInstall,CustomActionData=2.014{9E8038B6-09DB-4223-BCE5-E3D3CC096D5D}72IRISCAN-20-EN-100blalbalbla)
MSI (s) (D0:10) [14:45:16:282]: Executing op: ActionStart(Name=MsiInstallDrivers,,)
Action 14:45:16: MsiInstallDrivers.
MSI (s) (D0:10) [14:45:16:282]: Executing op: CustomActionSchedule(Action=MsiInstallDrivers,ActionType=3073,Source=BinaryData,Target=InstallDriverPackages,CustomActionData=2.014{9E8038B6-09DB-4223-BCE5-E3D3CC096D5D}C:\Program Files\74EU\72BLALBALAL-20-EN-100blablalbala)
MSI (s) (D0:64) [14:45:16:292]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI3D.tmp, Entrypoint: InstallDriverPackages
DIFXAPP: InstallDriverPackages
DIFXAPP: 'CustomActionData' property 'DIFxApp Version' is 2.01.
DIFXAPP: 'CustomActionData' property 'UI Level' is 4.
DIFXAPP: 'CustomActionData' property 'componentId' is {9E8038B6-09DB-4223-BCE5-E3D3CC096D5D}.
DIFXAPP: 'CustomActionData' property 'componentPath' is C:\Program Files\74EU\.
DIFXAPP: 'CustomActionData' property 'flags' is 0x7.
DIFXAPP: 'CustomActionData' property 'installState' is 2.
DIFXAPP: 'CustomActionData' property 'ProductName' is BLALBALBL-20-EN-100.
DIFXAPP: 'CustomActionData' property 'ManufacturerName' is blablalbla.
DIFXAPP: INFO: ENTER: DriverPackageInstallW
DIFXAPP: INFO: 74EU.inf: checking signature with catalog 'C:\Program Files\74EU\74eu.cat' ...
DIFXAPP: ERROR: Driver package '74EU.inf' is unsigned. (Error code 0x800B0100: No signature was present in the subject.)
DIFXAPP: INFO: Successfully removed {9E8038B6-09DB-4223-BCE5-E3D3CC096D5D} from reference list of driver store entry
DIFXAPP: INFO: RETURN: DriverPackageInstallW (0x800B0100)
DIFXAPP: ERROR encountered while installing driver package C:\Program Files\74EU\74EU.inf
DIFXAPP: InstallDriverPackages failed with error 0x800B0100
Action ended 14:45:16: InstallFinalize. Return value 3.
MSI (s) (D0:10) [14:45:16:693]: User policy value 'DisableRollback' is 0
MSI (s) (D0:10) [14:45:16:693]: Machine policy value 'DisableRollback' is 0
MSI (s) (D0:10) [14:45:16:693]: Executing op: Header(Signature=1397708873,Version=300,Timestamp=944928149,LangId=1033,Platform=0,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)
MSI (s) (D0:10) [14:45:16:693]: Executing op: DialogInfo(Type=0,Argument=1033)
MSI (s) (D0:10) [14:45:16:693]: Executing op: DialogInfo(Type=1,Argument=IRISCAN-20-EN-100)
MSI (s) (D0:10) [14:45:16:693]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
Action 14:45:16: Rollback. Rolling back action:
Rollback: MsiInstallDrivers
MSI (s) (D0:10) [14:45:16:693]: Executing op: ActionStart(Name=MsiInstallDrivers,,)
MSI (s) (D0:10) [14:45:16:693]: Executing op: ProductInfo(ProductKey={5379826B-C9AC-4DD7-AEDB-D3596BC312C0},ProductName=IRISCAN-20-EN-100,PackageName=BLALBALBLA-20-EN-100.msi,Language=1033,Version=33554532,Assignment=1,ObsoleteArg=0,,,PackageCode={5995114E-8BA8-4225-AF25-653D8FEA783F},,,InstanceType=0,LUASetting=0)
Rollback: MsiRollbackInstall
MSI (s) (D0:10) [14:45:16:693]: Executing op: ActionStart(Name=MsiRollbackInstall,,)
MSI (s) (D0:10) [14:45:16:703]: Executing op: CustomActionRollback(Action=MsiRollbackInstall,ActionType=3329,Source=BinaryData,Target=RollbackInstall,CustomActionData=2.014{9E8038B6-09DB-4223-BCE5-E3D3CC096D5D}72IRISCAN-20-EN-100BLALBALL)
MSI (s) (D0:BC) [14:45:16:703]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI3E.tmp, Entrypoint: RollbackInstall
DIFXAPP: RollbackInstall
DIFXAPP: 'CustomActionData' property 'DIFxApp Version' is 2.01.
DIFXAPP: 'CustomActionData' property 'componentId' is {9E8038B6-09DB-4223-BCE5-E3D3CC096D5D}.
DIFXAPP: 'CustomActionData' property 'flags' is 0x7.
DIFXAPP: 'CustomActionData' property 'installState' is 2.
DIFXAPP: 'CustomActionData' property 'ProductName' is BLABLAL-20-EN-100.
DIFXAPP: 'CustomActionData' property 'ManufacturerName' is BLABLALBAL.
DIFXAPP: This was the component where the install failure occurred. The rollback for this component must have already occurred at the time of failure. No need to rollback again
DIFXAPP: Rollback failed with error 0x2


What happens: it rolls back during installation.

The steps:
  • With Inf2Cat I made a .cat file
  • With MakeCert I made both a .cer and .pvk file
  • With Cert2Spc I made a .spc file
  • With signcode.exe I signed the catalog file

In the ISM I did the following:
  • I added a custom action I added the certificate file. It is directrly after PublishComponents. This custom action runs in deferred execution in system context.
  • I added the DIFxApp merge module
  • The table 'DriverInstallationPackages' has a flag of '7'
  • There a 2 components: _4EU and _4EU1.
    • Component _4EU:
      • 74EU.cat
      • 74EU.inf (KEYFILE)

    • Component _4EU1
      • AutoSet.dll (KEYFILE)
      • GetInst32.dll
      • Micdrv.dll
      • USB2.cer
      • usbscan.sy_

During testing I added a pause statement after the certificate installation. I saw that the certificate was installed successully (doubleclick on the .cat file)

The .inf:


[Version]
Signature="$CHICAGO$"
Class=Image
ClassGUID={6bdd1fc6-810f-11d0-bec7-08002be2092f}
Provider=%IPC%
DriverVer=05/02/2002,1.0.1.1
LayoutFile=layout.inf
CatalogFile.ntx86=74eu.cat
[SourceDisksNames]
1=%DisksName%,,,
[SourceDisksFiles]
usbscan.sy_=1
Micdrv.dll=1
AutoSet.dll=1
GetInst32.dll=1
[DestinationDirs]
CopySetupFile=10
CopyUsbScan=11
DefaultDestDir=11
[CopyUsbScan]
usbscan.sys,usbscan.sy_,,32
[CopySetupFile]
AutoSet.dll,,,32
[IPCProduct.AddReg.9x]
HKLM,%RunOnce%,"RunSetup",,"RunDll32.exe AutoSet.dll,fnRun USBSCAN INFO,Scanner Information\USB"
HKLM,%InfInfo%,"SetupProgram",,"%1%\Install.exe"
HKLM,%InfInfo%,"SetupExist",,"%1%\Install.ini"
HKLM,%InfInfo%,"CommandLine",,"74E"
HKLM,%InfInfo%,"SetupCaption",,"USB Scanner Setup"
HKLM,%InfInfo%,"SetupErrorExist",,"Please insert the Film Scanner Setup / Application CD-ROM into your CD-ROM drive."
[IPCProduct_UsbScan.AddReg]
HKR,,DevLoader,,*NTKERN
HKR,,NTMPDriver,,"usbscan.sys"
[IPCProduct_Wia.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbscan.sys
HKR,,HardwareConfig,1,4
HKLM,%InfInfo%,"Temp_WiaDriver",,%FN_MicroDriver%
HKLM,%RK_WIA%,PathName,,%11%\%FN_MicroDriver%
HKLM,%RK_WIA%,TICKSBUTTON,0x00010001,250
HKLM,%RK_WIA%,WHQL,0x00010001,0
[IPCProduct.DeviceData.WIA]
TwainDS=%TwainDSName%
Server=local
MicroDriver="Micdrv.dll"
UI DLL=sti.dll
UI Class ID={4DB1AD10-3391-11D2-9A33-00C04FA36145}
[Manufacturer]
%IPC%=Models,NTx86.5.1
[Models]
%IPCProduct%=IPCProduct,USB\VID_07b3&PID_045F
[Models.NTx86.5.1]
%IPCProduct%=IPCProduct_NT51,USB\VID_07b3&PID_045F
[IPCProduct]
AddReg=IPCProduct.AddReg.9x,IPCProduct_UsbScan.AddReg
;Copyfiles=CopyUsbScan
Copyfiles=CopySetupFile,CopyUsbScan
[IPCProduct.NT]
DriverVer=05/02/2002,1.0.1.1
Include=sti.inf
Needs=STI.USBSection
AddReg=IPCProduct.AddReg,IPCProduct_UsbScan.AddReg
;Copyfiles=CopySetupFile
[IPCProduct.NT.Services]
Include=sti.inf
Needs=STI.USBSection.Services
[IPCProduct_NT51]
DriverVer=05/02/2002,1.0.1.1
Include=sti.inf
Needs=STI.USBSection,STI.MICRODRIVERSection
SubClass=StillImage
DeviceType=1
Capabilities=0x31
DeviceData=IPCProduct.DeviceData.WIA
AddReg=IPCProduct.AddReg,IPCProduct_Wia.AddReg
Copyfiles=WinXPCopyFile
ICMProfiles="sRGB Color Space Profile.icm"
[WinXPCopyFile]
Micdrv.dll
[IPCProduct_NT51.Services]
Include=sti.inf
Needs=STI.USBSection.Services
[IPCProduct.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[IPCProduct.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[IPCProduct_NT51.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[CoInstaller_CopyFiles]
GetInst32.dll
[CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"GetInst32.dll,GetInfoCoInstaller"
[InstallInfo]
OriginalInfSourcePath = %1%
[Strings]
IPC="Product"
IPCProduct="IRIScan2 Scanner"
ServiceName="IRIScan2 Scanner Driver"
TwainDSName="IRIScan2 Scanner"
RunOnce="Software\Microsoft\windows\CurrentVersion\RunOnce"
InfInfo="Software\USBSCAN INFO\Inf_Info"
RK_WIA="Software\Scanner Information\USB\Wia"
FN_MicroDriver="Micdrv.dll"
DisksName="IRIScan2 Scanner CD-ROM",,,
;[ControlFlags]
;ExcludeFromSelect=*


Any suggestion how to solve this??

With kind regards,
WillemJan
Answered 02/18/2008 by: WillemJan
Senior Yellow Belt

Please log in to comment
2
From the log:
DIFXAPP: INFO: 74EU.inf: checking signature with catalog 'C:\Program Files\74EU\74eu.cat' ...
DIFXAPP: ERROR: Driver package '74EU.inf' is unsigned. (Error code 0x800B0100: No signature was present in the subject.)

In the 74EU.inf file try changing from "CatalogFile.ntx86=74eu.cat" to "CatalogFile=74eu.cat" instead and see if that helps.
Answered 02/18/2008 by: AngelD
Red Belt

Please log in to comment
0
Hello AngelD,

Thank you for your reply. It did not solve my problem.


[Version]
Signature="$CHICAGO$"
Class=Image
ClassGUID={6bdd1fc6-810f-11d0-bec7-08002be2092f}
Provider=%IPC%
DriverVer=05/02/2002,1.0.1.1
LayoutFile=layout.inf
CatalogFile=74eu.cat
[SourceDisksNames]
1=%DisksName%,,,
[SourceDisksFiles]
usbscan.sy_=1
Micdrv.dll=1
AutoSet.dll=1
GetInst32.dll=1
[DestinationDirs]
CopySetupFile=10
CopyUsbScan=11
DefaultDestDir=11
Answered 02/18/2008 by: WillemJan
Senior Yellow Belt

Please log in to comment
2
Did you re-generate the cat file after modifying the .inf file?
Use INF2CAT to verify that it has been signed correctly.
Answered 02/18/2008 by: AngelD
Red Belt

Please log in to comment
0
AngelD,

I did not regenerate the CAT file. I will give it a try next week.
Thank you for your help.

With kind regards,
Willem-Jan
Answered 02/18/2008 by: WillemJan
Senior Yellow Belt

Please log in to comment
0
Don't forgett to sign the CAT-file after generating it.
Answered 02/18/2008 by: AngelD
Red Belt

Please log in to comment
0
Solved:
  • I modified the driver.inf:

    CatalogFile=74eu.cat

  • Made the .cat file again
  • Signed the .cat file with signcode.exe
  • Modified the ISM file
  • Compiled
  • Tested ok

AngelD: many thanks for your replies.

With kind regards,
WillemJan
Answered 02/19/2008 by: WillemJan
Senior Yellow Belt

Please log in to comment
0
Hi Angel ID,

I just want to thank you for the very explained detail that really helped me a lot, having had package a 3G Card Driver which was unsigned was a pain in the a**. I had to download a lot of tools of the .NET SDK and other stuff to finally create catalog, sign them and install. Your post here has been helpful and I've rated 2 for you. Thanks a lot man.
Answered 08/18/2009 by: PackageExpert
Blue Belt

Please log in to comment
0
No no, thank you PE!
Great that you found it useful
Answered 08/31/2009 by: AngelD
Red Belt

Please log in to comment
1
Hi all,

I stopped going through the whole hasle of resigning drivers.

The is a way to export the driver signed information one generates when clicking the red "Yes do install" / "Always trust this publisher" information into a *.reg file.
One can import this reg file prior to installing the driver. It is also very well possible to add the register information into an MSI or MST installation file, but do make sure the MSI handles the register prior to installing device drivers.


Regards,

Marc

Answered 10/05/2015 by: mduiker
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity