3

I am trying to upgrade a printer driver remotely and have prepared a batch file for this. The only problem is that when I'm installing the drivers I get a popup in which I need to press "Continue Anyway".

Is there a way to automatically accept this question? I won't be able to go to all the machines that need to be upgraded.

The popup:

popup

1

2 Answers 2

4

Unless these machines are on a domain, you cannot easily mass configure your Windows XP machines to dismiss this dialog. That dialog is there for a reason: To prevent drivers from silently installing and undermining your OS's stability and security.

If determined, you could perhaps develop a script that simulates a user performing the following reconfiguration steps:

  1. On the desktop, right-click My Computer, and then click Properties.
  2. Click the Hardware tab, and then click Driver Signing in the Drivers area.
  3. In the What action do you want Windows to take? area, click the desired action, and then click OK two times.

For more information, check out Microsoft Support article 298503 entitled "Driver signing registry values cannot be modified directly in Windows".

3
  • Thank you for your answer. If possible I don't want it to change any rules for how to treat these questions, only auto accept this one time (even though it is an acceptable solution if nothing else works). The problem is that there is already an application on top of everything stealing the attention of all input, so no boxes will actually be visible for the users on the machine. The ideal way is for them to never notice that an upgrade has been completed.
    – olofom
    Jun 28, 2011 at 9:29
  • Hmm. Another (costly) solution would be to purchase a code signing certificate ($99, Verisign w/ coupon WINQUAL99) and sign the drivers in question. Jun 28, 2011 at 16:28
  • Nah, that's too expensive. Not worth it.
    – olofom
    Jun 29, 2011 at 8:19
1

I solved it by creating a small VBScript that I run forked from the main process. It runs at the same time as the driver installation process and waits for the accept window and then accepts it with Alt+C.

Set WshShell = WScript.CreateObject("WScript.Shell")

'Check if the Hardware installation window is present, else sleep 1 second and try again.
present = 0
Do Until present = 1
    If WshShell.AppActivate("Hardware Installation") Then
        present = 1
    Else
        WScript.Sleep 1000
    End If
Loop

'Make the Hardware Installation window active
WshShell.AppActivate "Hardware Installation"

'Send Alt+C
WshShell.SendKeys "%C"
2
  • Was that sufficient? You got off easy. ;-)
    – Synetech
    Jun 30, 2011 at 3:03
  • Yes, it works fine. And you're right, I got off easy :)
    – olofom
    Jul 1, 2011 at 12:11

You must log in to answer this question.

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