Win 10: DISABLE "device installation settings" via registry or GP ?

Discussion in 'Windows 10' started by DavidinCT, Aug 13, 2016.

  1. Leporello

    Leporello MDL Novice

    Sep 20, 2010
    39
    12
    0
    But that is nothing the OP wanted to get.

    Blocking Windows to update the computer is easy. However, the OP just wanted to block specific drivers for a specific device!
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,194
    84,734
    340
    True, some cases are just hopeless :)
     
  3. as9j0das90d

    as9j0das90d MDL Novice

    Jul 18, 2015
    17
    15
    0
    #45 as9j0das90d, Aug 18, 2016
    Last edited by a moderator: Apr 20, 2017
    personally i just remove the windows update driver handler
    by deleting
    HKLM\SOFTWARE\Microsoft\WindowsUpdate\UpdateHandlers\Driver

    powershell code (bit problematic because the key is owned by trusted installer)
    Code:
    $ErrorActionPreference = "Inquire"
    
    #get SeTakeOwnershipPrivilege
    $definition = @"
    using System.Runtime.InteropServices;
    public class NtDll {
        [DllImport("ntdll.dll")]
        public static extern int RtlAdjustPrivilege(ulong Privilege, bool Enable, bool CurrentThread, ref bool Enabled);
    }
    "@
    Add-Type $definition
    [NtDll]::RtlAdjustPrivilege(9, 1, 0, [ref]0)
    
    
    #name of hklm subkey
    $name = "SOFTWARE\Microsoft\WindowsUpdate\UpdateHandlers\Driver"
    
    
    #open key
    $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($name, "ReadWriteSubTree", "TakeOwnership")
    
    
    #change ownership
    $owner = [System.Security.AccessControl.RegistrySecurity]::new()
    $owner.SetOwner([System.Security.Principal.NTAccount]"Administrators")
    $key.SetAccessControl($owner)
    
    
    #change access rules
    $rule = [System.Security.AccessControl.RegistrySecurity]::new()
    $rule.SetAccessRule([System.Security.AccessControl.RegistryAccessRule]::new("Administrators", "Full", 0, 0, 0))
    $key.SetAccessControl($rule)
    
    
    #delete key
    [Microsoft.Win32.Registry]::LocalMachine.DeleteSubKey($name)
     
  4. napalmjive

    napalmjive MDL Novice

    Oct 20, 2013
    2
    1
    0
    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" /v "SearchOrderConfig" /t REG_DWORD /d 0 /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f
     
  5. hack

    hack MDL Senior Member

    Sep 14, 2009
    293
    252
    10
    The solution to the OP's problem. You can even set a custom message etc.
    Deployed through Domain joined machines it is as easy as pie, otherwise create a working deployment image with all software and local GP policies and clone it to the 48 machines
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    thanks dude for the heads up, so I download the Windows ADK for use with Windows 10 version 1607 to work in Windows ICD is one huge download 6,6GB (already installed) then this night I can start my new project with Windows 10 Enterprise LTSB 2016 x64 and compare with MSMG to see diferences in each one right :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    ok right ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Leporello

    Leporello MDL Novice

    Sep 20, 2010
    39
    12
    0
    #50 Leporello, Aug 20, 2016
    Last edited: Aug 20, 2016
    Of course, the big question always remains: Why should I do something easily when I can do it in a very complicated way, too ????


    - Take the ORIGINAL question (and the problem) the Original Poster had in the first thread here.
    - Then take my answer and proposal to use Group Policy Editor.
    - problem solved, solution done!

    ------------------------------------------

    And where are we now ???? ===> Loading tons of Giga Bytes and use Instruments thought for System Administrators in big Companies.

    Frankly, that doesn't help very much.
     
  9. WinFree

    WinFree MDL Senior Member

    Aug 6, 2016
    317
    53
    10
  10. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10