5

I am trying to automatically-and-silently install a specific printer driver(ghostpdf) and printer to prepare multiple machines for running tests. I use Command line install of printer driver

 rundll32 printui.dll, PrintUInternet Explorerntry /Gw /ia /m "Ghostscript PDF" /K /h x64 /v 3 /f 
"c:\temp\lib\ghostpdf.inf"

The c:\temp\lib has driver copied for GhostPDF (http://ghostscript.com/GhostPDF.HTML)

The installation shows a message "Windows can't verify the publisher of this driver software". There are multiple solutions to suppress this warning, all involves a reboot. Is there a way to suppress the "Windows security warning" and install printer driver using scripts?

Journeyman Geek
  • 133,878
Jayan
  • 371

2 Answers2

3

for those of you who want to bypass the security dialog which occurs when installing non-MS-WHQL-signed drivers on Windows 7 64Bit (and Windows 8, 8.1) there was only a single solution for me that worked for scripted, automated, unattended or silent installations: import the certificates prior to install

Follow these steps:

  1. install the software once manually by confirming that the unsigned drivers shall be used

  2. go to %windir%\inf and search for the latest OEM??.INF file; open it (notepad) and verify by its contents that this is the driver you wish to install automatically next time

  3. go to %windir%\system32\catroot{any ID}\OEM??.CAT (<- same number as in step 2); right click on this file, select properties, go to "Digital Signatures" tab, mark the certificate, click on details

  4. on the next window click "Show Certificate"

  5. on the next window open the "Details" tab and click "Save to File..."

  6. collect this/all certificates

  7. deploy these certificates

7a. either in a batch /cmd script using "certutil.exe -f -addstore "TrustedPublisher" "MYFILE.cer" prior to setup

7b. or by Group Policies (computer \ Policies \ Windows \ Security \ Public Key Policies \ add your files here )

finally, run your setup just the way you wanted :D

Note:

I was not able to bypass windows driver signature checks on Windows 7 SP1 Enterprise x64 using

  • Bcdedit.exe /set nointegritychecks ON

  • Bcdedit.exe /set testsigning ON

  • Bcdedit.exe /set loadoptions DDISABLE_INTEGRITY_CHECKS

  • Group Policy / Users / Settings / Administrative Templates / System / Drivers / Signature = ignore

  • Application Compatibility (ApplicationCompatibilityToolkitSetup.exe http://www.microsoft.com/download/en/details.aspx?id=7352 ) set NoSignatureCheck, Export DB, sdbinst -q \path\dbfile.sdb)

2

Is there a way to supress the "Windows security warning" and install printer driver using scripts?

No. The fact that you want to install unsigned drivers legitimately without a prompt is no different to virus writers wanting to install unsigned drivers illegitimately without a prompt.

ta.speot.is
  • 14,323