locked
Need to turn off the Windows 7 Automatic Driver Installation and Automatic Windows Update using Powershell RRS feed

  • Question

  • Hi - I just started learning Powershell a couple months ago.  Posted once on this forum when I was just getting started and people were very helpful with directing me to links for the basics.

    I am writing a Powershell script to automate a Windows 7 PC build.  Have been doing fairly well getting a lot of things done (adding user accounts, changing passwords, changing the computer name, adding printer drivers and printers, et al), but I'm running into a wall trying to find anything online that tells how to use Powershell to turn OFF the Windows 7 Automatic Driver Installation (becomes a big problem when the system tries to install a driver that does not work with some of our devices) or how to turn off the Automatic Windows Update (we will update as needed as we go along). 

    I of course know how to do these manually - "change device installation settings" and click on "No, let me choose what to do," then "Never install drivers software from Windows Update".  And for Windows Update, go to "change settings" and choose "Never check for updates (not recommended)" under "Important updates".  I would also need to uncheck "allow all users to install updates on this computer."

    How can I change to those settings via Powershell?

    Thank you!

    Tuesday, July 30, 2013 5:06 PM

Answers

  • I did find the reg key to turn off Windows 7 Automatic Driver Installation:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching] "SearchOrderConfig"=dword:00000000

    0 = "No, let me choose what to do - Never install driver software from Windows Update" 1 = "Yes, do this automatically (recommended)" 2 = "No, let me choose what to do - Install driver software from Windows Update if it is not found on my computer."

    So the Powershell command to turn of the Automatic Driver Installation in Windows 7 is

    Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching -Name SearchOrderConfig -Value 0

    • Marked as answer by BiggRedd Wednesday, August 7, 2013 8:03 PM
    Wednesday, August 7, 2013 8:03 PM

All replies

  • i have a feeling this might be done somewhere in registry.. but you could use powershell to set keys in registry fairly simple

    check here for windows updates reg key

    http://superuser.com/questions/541826/registry-key-setting-to-enable-windows-to-download-driver-from-windows-update

    you can modify gpo for the driver one, probably also for updates

    http://technet.microsoft.com/en-us/library/cc753091.aspx

    • Edited by ImMax Tuesday, July 30, 2013 5:38 PM dfgdgf
    • Proposed as answer by Yan Li_ Wednesday, July 31, 2013 3:08 AM
    Tuesday, July 30, 2013 5:29 PM
  • I did find the reg key to turn off Windows 7 Automatic Driver Installation:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching] "SearchOrderConfig"=dword:00000000

    0 = "No, let me choose what to do - Never install driver software from Windows Update" 1 = "Yes, do this automatically (recommended)" 2 = "No, let me choose what to do - Install driver software from Windows Update if it is not found on my computer."

    So the Powershell command to turn of the Automatic Driver Installation in Windows 7 is

    Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching -Name SearchOrderConfig -Value 0

    • Marked as answer by BiggRedd Wednesday, August 7, 2013 8:03 PM
    Wednesday, August 7, 2013 8:03 PM