Script to auto-accept the Windows 7 “Would you like to install this device software?” prompt

By | August 26, 2011
Share

When an application install calls for a device installation in Windows 7 a prompt appears.  In some cases, the prompt can not be automatically accepted using silent install switches (ie. Netmotion install).  I created an AutoIt script to accept the prompt.

Windows 7 install device driver prompt

Script Download: http://tinyurl.com/installprompt

AutoIt source code:

For $i = 1 to 20
	WinWaitActive("Windows Security")
	SendKeepActive("Windows Security")
	;Send Alt+I to Install Prompted Driver
	Send("!i")
	Sleep(500)
Next

-Brian G

16 thoughts on “Script to auto-accept the Windows 7 “Would you like to install this device software?” prompt

  1. Jason

    How long does this last? is this a permanant change? I’m needing to deploy Netmotion 9.22 also. Looks like you have invented the wheel already.

    Reply
  2. Brian Gonzalez

    This was a popup I ran into with Windows 7 on a clean installation. If upgrading from a previous version of Netmotion you should be good to go. I started the AutoIt script mentioned in the posting FIRST with a do not wait flag and then ran the Netmotion silent install string outlined on their website:
    http://www.netmotionwireless.com/support/technotes/2182.aspx

    If you run into further issues, I would suggest removing the config .INF and then simply import your netmotion server into the client registry. You can find the key where that information is located by viewing the .INF file.

    Good luck.

    Reply
  3. sriram

    I have downloaded your script from here.Where can i use these files in my windows OS setup…(ie)Where can i put these files in Windows OS setup..

    Reply
  4. Brian Gonzalez Post author

    Start this application before you start the netmotion silent installer. It simply checks waits for the popup to appear and then click on Alt+I to approve the driver install.

    Reply
    1. Sandy

      I’m attempting to run the autoit exe first as part of a bat file, followed by the Netmotion installer as a SCCM package. The script starts, Netmotion starts to install, gets to the above device question, and then gives an autoit error for SendKeepActive being an unknown function name. Any suggestions?

      Reply
      1. Brian Gonzalez Post author

        Cindy, I have found a new way to address this prompt. I now install the driver and check the box to tell Windows 7 to trust the publisher. Once installed, I export the .CER certificate from the machine from the Internet Options (IE Options) content tab. And then import the .CER before running the install on target machines. Because the publisher is trusted, no prompt appears. Be aware that the .CER does expire, so it will have to updated every 6 months or so.

        -Brian G

        Reply
        1. Cindy

          When you say the cer expires, does this mean each client machine cer would need to be updated or just the cer with the package that gets pushed?

          Thanks

          Reply
  5. Sandy

    I’m trying to run your autoit script and am getting the error SendKeepActive is an unknown function name. Any suggestions?

    Reply
    1. Brian Gonzalez Post author

      SendKeepActive is a built-in function in AutoIt, Im honestly not sure where that error is coming from. Look at my other method and give that a shot.

      -Brian G

      Reply
  6. Riley

    Can someone help me with a script?
    I have the front end; it calls and pulls down the .exe and starts the install after verifying the creds, but then hangs… trying to upgrade all our clients to Netmo 9.5.XX any help?

    Reply
    1. Brian Gonzalez Post author

      Try installing the cert first in the trusted pub store using the certutil until, which is built into windows 7. If you need an example of this let me know and I’ll post one.

      Brian g

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.