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?

2 Answers 2

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.

5
  • -1. deploying software to numerous internal machines via a install script does not constitute a "virus", it's called "making my life easier".
    – Ryan_S
    Jan 31, 2013 at 15:07
  • 2
    @Ryan_S You're missing the point. The reason you can't bypass it is that it's ambiguous as to whether someone is installing an unsigned driver legitimately or maliciously. Jan 31, 2013 at 20:22
  • the real point is that you used to be able to turn that prompt off, which was super helpful. now I have to write a fancy AutoIT script to hit OK! on all of those boxes. I'll concede that you have a point for 90% of situations though.
    – Ryan_S
    Jan 31, 2013 at 20:29
  • @Ryan_S Let us know if AutoIT works out for you. Jan 31, 2013 at 20:41
  • If someone malicious already has administrator access, they'll already be able to do whatever harm they want. Stopping them from installing a printer driver achieves exactly nothing. Aug 9, 2016 at 3:57
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)

1
  • I think this addresses device drivers, not print drivers? Aug 9, 2016 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .