How to disable a device in the registry with xp

Grimmda

2[H]4U
Joined
Jul 1, 2003
Messages
3,130
Does anyone know how to disable a device in the registry? As opposed to going into device manager and right clicking/disable device?

I have a laptop with Bluetooth that I want to be able to flip a switch in a batch file to disable it.

This is part of an automated script that once it see's it's a particular device type I want it to disable the device so there's no user intervention required to do so. Thanks!

ANd by the way my google-fu is not getting the job done. I haven't found a dang thing!
 

Grimmda

2[H]4U
Joined
Jul 1, 2003
Messages
3,130
I realized why no one had any ideas on this because based on my testing it doesn't work.

I took a "package building" application I use that looks at what changes are made to the file level and registry and found the values it changes when I manually right click and disable/re-enable the bluetooth device.

I tried making those changes manually in the registry and I can't, they are basically "locked" and in use. So it seems like there's not an easy way to change that from the registry.

But I received word back from my HP technical rep and he suggested I use a script to delete the .sys driver file from c:\windows\system32\drivers folder and then on the next reboot the device will NOT work but there will be NO pop-up to add new hardware. He was right. If you look in the device manager the bluetooth device shows with a yellow exclamation point stating it can't find the driver file.

This soultion worked in my case so just an FYI to anyone who might ever want to perform something like this.
 
Top