{"id":9243,"date":"2023-04-19T23:56:21","date_gmt":"2023-04-19T21:56:21","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=9243"},"modified":"2024-09-18T14:24:19","modified_gmt":"2024-09-18T12:24:19","slug":"windows-prevent-windows-from-installing-a-specific-devicedriver","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-prevent-windows-from-installing-a-specific-devicedriver\/","title":{"rendered":"Windows: Prevent windows from installing a specific device(driver)"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_9243 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_9243')){$('.twoclick_social_bookmarks_post_9243').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Prevent%20windows%20from%20installing%20a%20specific%20device%28driver%29\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0AWindows%20Group%20Policies%20have%20to%20ability%20to%20prevent%20installation%20specific%20devices.%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-prevent-windows-from-installing-a-specific-devicedriver\\\/\",\"post_id\":9243,\"post_title_referrer_track\":\"Windows%3A+Prevent+windows+from+installing+a+specific+device%28driver%29\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>Windows Group Policies have to ability to prevent installation specific devices.<br \/>\n<!--\nhttps:\/\/learn.microsoft.com\/en-us\/windows\/client-management\/manage-device-installation-with-group-policy\n--><br \/>\n<!--more--><br \/>\nThese policies are located in the GPO Path<\/p>\n<p><strong>Computer Configuration\/Administrative Templates\/System\/Device Installation<\/strong><\/p>\n<p>The device installation can be prevented my multiple properties.<br \/>\n-Hardware ID, Vendor ID<br \/>\n-Instance ID<br \/>\n-Device\/Hardware Class<br \/>\n-Removable Storage<br \/>\n-&#8230;<br \/>\nFor example a specific device. A Logilink Wifi Card. Determine the Hardware ID (class,&#8230;) by pnputil or the Windows device manager<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; pnputil \/enum-devices \/ids\r\n...\r\nInstanz-ID:                USB\\VID_148F&amp;PID_5370\\1.0\r\nGer\u00e4tebeschreibung:        802.11n USB Wireless LAN Card\r\nKlassenname:                 Net\r\nKlassen-GUID:                 {4d36e972-e325-11ce-bfc1-08002be10318}\r\nHerstellername:            Ralink Technology , Corp.\r\nStatus:                     Gestartet\r\nTreibername:                netr28ux.inf\r\nHardware-IDs:               USB\\VID_148F&amp;PID_5370&amp;REV_0101\r\n                            USB\\VID_148F&amp;PID_5370\r\nKompatible IDs:             USB\\Class_FF&amp;SubClass_FF&amp;Prot_FF\r\n                            USB\\Class_FF&amp;SubClass_FF\r\n                            USB\\Class_FF\r\n...\r\n<\/pre>\n<p><figure id=\"attachment_9249\" aria-describedby=\"caption-attachment-9249\" style=\"width: 217px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-installed.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-installed-217x300.png\" alt=\"Windows device manager  installed device\" width=\"217\" height=\"300\" class=\"size-medium wp-image-9249\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-installed-217x300.png 217w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-installed.png 340w\" sizes=\"auto, (max-width: 217px) 100vw, 217px\" \/><\/a><figcaption id=\"caption-attachment-9249\" class=\"wp-caption-text\">Windows device manager  installed device<\/figcaption><\/figure><br \/>\nSet the policy. Take note of the &#8220;Also apply to matching devices that are already installed&#8221; switch.<\/p>\n<p>&#8220;Device Installation Restrictions\/Prevent installation of devices that match any of these device IDs&#8221;<br \/>\n<figure id=\"attachment_9247\" aria-describedby=\"caption-attachment-9247\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID-300x277.png\" alt=\"Windows prevent device installation by ID\" width=\"300\" height=\"277\" class=\"size-medium wp-image-9247\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID-300x277.png 300w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID.png 688w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-9247\" class=\"wp-caption-text\">Windows prevent device installation by ID<\/figcaption><\/figure><\/p>\n<figure id=\"attachment_9248\" aria-describedby=\"caption-attachment-9248\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID-View.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID-View-300x201.png\" alt=\"Windows prevent device installation by ID detail view\" width=\"300\" height=\"201\" class=\"size-medium wp-image-9248\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID-View-300x201.png 300w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-ID-View.png 495w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-9248\" class=\"wp-caption-text\">Windows prevent device installation by ID detail view<\/figcaption><\/figure>\n<p>Apply the policy<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; gpupdate \/force \/target:Computer\r\n<\/pre>\n<p>And open the device manager<br \/>\n<figure id=\"attachment_9250\" aria-describedby=\"caption-attachment-9250\" style=\"width: 226px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-not-installed.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-not-installed-226x300.png\" alt=\"Windows device manager device not installed \" width=\"226\" height=\"300\" class=\"size-medium wp-image-9250\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-not-installed-226x300.png 226w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2023\/04\/Windows-Prevent-Device-Installation-by-device-manager-not-installed.png 367w\" sizes=\"auto, (max-width: 226px) 100vw, 226px\" \/><\/a><figcaption id=\"caption-attachment-9250\" class=\"wp-caption-text\">Windows device manager device not installed<\/figcaption><\/figure><\/p>\n<p>If a device is blocked a Event with ID 402 is logged to the Windows Kernel-PNP Log.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; Get-WinEvent -FilterHashtable @{&quot;LogName&quot;=&quot;Microsoft-Windows-Kernel-PnP\/Configuration&quot;;&quot;ID&quot;=&quot;402&quot; }\r\nTimeCreated                      Id LevelDisplayName Message\r\n-----------                      -- ---------------- -------\r\n20.04.2023 22:33:21             402 Warnung          Die Konfiguration des Ger\u00e4ts USB\\VID_148F&amp;PID_5370\\1.0 wurde durch eine Richtlinie blockiert\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, Windows Group Policies have to ability to prevent installation specific devices.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5],"tags":[1965,1966,24,294,1967,20],"class_list":["post-9243","post","type-post","status-publish","format-standard","hentry","category-windows","category-windowsknowhow","tag-device","tag-hardware-id","tag-installation","tag-prevent","tag-vendor-id","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=9243"}],"version-history":[{"count":7,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9243\/revisions"}],"predecessor-version":[{"id":9880,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9243\/revisions\/9880"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=9243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=9243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=9243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}