LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using setupapi to uninstall hardware

During production test, we test usb products.

Problem is, everytime we connect another UUT, it creates another entry in the registry.

 

I believe it is possible to use the windows setupapi to uninstall devices, and so clear the

registry in the correct way.

 

Anyone ever used this or have any advice?

Thanks

0 Kudos
Message 1 of 2
(2,696 Views)

Hi Morngoose,

 

Good afternoon and I hope your well today. 

 

The usb device information is stored under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB - you can then delete these - see this external link titled

Removing USB Windows Registry Keys.

 

Another method would be just to make a backup of the registry and then replace it at the end of the test.

 

I would also like to suggest you could take a read of the following knowledgebase, What Registry Changes Result from Installing or Uninstalling Hardware or Software? It explains you can do a check on what files change during an installation, and you can just delete these at the end.

 

The steps you need to take are something like,

 

  1. Go to Start » Run and type regdt32. Click the OK button. This will launch the Registry Editor.
  2. Navigate through the Registry tree as follows: HKEY_LOCAL_MACHINE » System » CurrentControlSet » Enum » PCI. You will see several Registry Keys in this folder, which look like this: VEN_####&DEV_####. These are vendor and device codes, respectively.
  3. The National Instruments vendor code is 1093, so remove the Registry Keys that are of the form: VEN_1093&_DEV_####. If Windows does not allow you to delete a key, you may need to change your user permissions.
I hope this information helps, and please post back to discuss your issue further.

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 2
(2,676 Views)