Software Deployment Question

Scripted Install of Signed Mirror Display driver in Vista

06/17/2008 5931 views

I'm trying to write a completely automated silent install script for a program called ZoomText (from AiSquared) that installs an unsigned mirror display driver under Vista Enterprise. The company provides a silent install method that provides switches for carrying out a "silent install" that somehow handles clicking the "yes" button in Vista's do you want to install an unsigned driver installation prompt. Unfortunately, it doesn't work for completely scripted installs that run as scheduled jobs because the user isn't actually logged in.

Microsoft's official answer for this problem is to take the vendor's unsigned driver and sign the driver with a certificate of your own that has been added to the computer's trusted root certification authorities and Trusted Publishers. After some learning and a wee bit of work, I was able to create a signed .cat file for their driver using one of our certificates. I was successfully at getting Vista to stage the newly signed driver in Vista's driver store using the pnputil.exe utility.

Unfortunately, it seems that the setup.exe file insists on attempting to install the vendor's unsigned driver in such a way that Vista doesn't check to see that a newer, signed version of the same driver is already stored on the system. Using SysInternal's procmon utility, I discovered that Vista is logging all the driver install activity in the %SystemRoot%\inf\setupapi.app.log and %SystemRoot%\inf\setupapi.dev.log files. In the {DIF_SELECTBESTCOMPATDRV} section of the setupapi.dev.log file, setup doesn't even search for other drivers even though Microsoft says a newer, signed driver trumps an older, unsigned driver. A few lines later in the log file, the install fails with the following message:
!!! sto: The driver package does not contain a catalog file. No error message will be displayed as client is running in non-interactive mode.
!!! sto: Driver package failed signature verification.

Since the only difference between their unsigned driver and our signed version of their driver is the addition of a CatalogFile entry in the .inf file and the actual .cat file, I tried pre-copying the modified .inf file and the .cat file into the folder that the setup.exe program makes to install the driver from. Unfortunately, it always overwrites the .inf file, despite the modifed file being newer. If I set the permissions to prevent setup.exe from overwriting the .inf file, the setup.exe file aborts with a file copy error.

Luckily (hopefully), the vendor's setup program continues to install the rest of the program, despite the mirrored driver install's failure. So, if I could manually install the mirror display driver, then all might be well.

Unfortunately, this is where I get stuck. I tried installing the signed version of the driver we created by using the "rundll32.exe setupapi,InstallHinfSection" trick that works so well on other drivers, but I can get it to create the helper service, but not actually install the mirror driver's display and miniport driver components.

Below please find the text from the .inf file, here is the sequence I've tried to install the driver with:
RunDll32.exe setupapi,InstallHinfSection mirror 128 C:\ztdriver\Ai2Mdd.inf
RunDll32.exe setupapi,InstallHinfSection Mirror.Miniport 128 C:\ztdriver\Ai2Mdd.inf
RunDll32.exe setupapi,InstallHinfSection Mirror.Display 128 C:\ztdriver\Ai2Mdd.inf

When I look at the setupapi.dev.log file after manually installing the program, I see a line that states "Class installer == DispCI.dll,DisplayClassInstaller" which is being used to install the mirror driver. Unfortunately, Google fails to give me clues on how to use DispCI.dll,DisplayClassInstaller and my blind stabs at it have not done anything.

Does anyone have any ideas on how I can script installing a mirror drive with the following .inf file?

; Ai2Mdd.inf
; Installation inf for the Ai Squared Mirror Display Driver.
; Copyright (x) 2007 Ai Squared. All rights reserved

Signature = "$Chicago$"
Provider = %Ai2%
ClassGUID = {4D36E968-E325-11CE-BFC1-08002BE10318}
Class = Display
CatalogFile = Ai2Mdd.cat

DefaultDestDir = 11
mirror.Miniport = 12 ; drivers
mirror.Display = 11 ; system32

; Driver information

%Ai2% = Mirror.Mfg

%Ai2MDD% = mirror, Ai_Squared_Mirror_Driver

; General installation section

CopyFiles=mirror.Miniport, mirror.Display

; File sections



; Service Installation

AddService = Ai2Mmpd, 0x00000002, mirror_Service_Inst, mirror_EventLog_Inst


LoadOrderGroup = Video
ServiceBinary = %12%\Ai2Mmpd.sys

AddReg = mirror_EventLog_AddReg


; Software Installation

AddReg = mirror_SoftwareDeviceSettings

HKR,, MirrorDriver, %REG_DWORD%, 1
HKR,, InstalledDisplayDrivers, %REG_MULTI_SZ%, Ai2Mdd
HKR,, VgaCompatible, %REG_DWORD%, 0
HKR,, Attach.ToDesktop, %REG_DWORD%, 1

MaximumNumberOfDevices = 1
KeepExistingDriverEnabled = 1

; Source file information

1 = %DiskId%,,,""

Ai2Mmpd.sys = 1
Ai2Mdd.dll = 1
Ai2V.sys = 1


; Non-Localizable Strings

REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
SERVICEROOT = "System\CurrentControlSet\Services"

; Localizable Strings

DiskId = "Ai Squared Mirror Driver Installation Disk"
Ai2 = "Ai Squared"
Ai2MDD = "Ai Squared Mirror Driver"
0 Comments   [ + ] Show comments


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

All Answers

Since you have a signed version of the driver (as it were), why not capture the vendor's install to an MSI?
Answered 06/18/2008 by: VBScab
Red Belt

Do you mean create an msi and use the diffxapp merge module to install the driver?
Capturing a driver install is not recommended.
Answered 06/18/2008 by: timmsie
Fourth Degree Brown Belt

Spot on, Ricardo. CaffeineImport < 5 gallons so far...

Found this after moving on from my AppDeploy meanderings to my InstallSite ones... http://forum.installsite.net/index.php?showtopic=15898
Answered 06/18/2008 by: VBScab
Red Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ