1
Answer

Disabling automatic device detection programmatically

Eugene Vv

Eugene Vv

13y
2.2k
1
Hello everybody! =) 
 Please help me with the next problem:
How to disable automatic device detection programmatically (in C#, maybe using winAPI)?  When I remove a device from a Device manager, I have to disable auto detection after rebooting windows. As I read, I should disable Plug&Play in registry. It seems I've done it (it works on Win XP, but not in Win7)
 How I did that: 
Disable Universal Plug and Play Device Host
Open your registry and find the key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\upnphost]. Set the value of "Start" to "4" to disable the service, or "3" to enable it.

Disable UnPnP Discovery Service
Open your registry and find the key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SSDPSRV]. Set the value of "Start" to "4" to disable the service, or "3" to enable it.

 Is it right?    Thanks for your attention to my question =)

 Have a nice day!)


Answers (1)