Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++
I want to delete the USB storage device information in windows 7, and now I know it is releate with these keys under HKEY_LOCAL_MACHINE\SYSTEM\CURRENT_CONTROL_SET\ENUM\USBS ,but i cannot delete it succefully because of the access control.Does anyone know how to solve this problem,think you
Posted 21-Apr-13 21:37pm
Edited 21-Apr-13 22:08pm
Sergey Alexandrovich Kryukov at 22-Apr-13 2:56am
There is no such thing as "regedit key"... :-)
Jochen Arndt at 22-Apr-13 2:57am
See this link if you want to remove drivers of old USB devices: By uninstalling the driver, all related information is also removed from the registry.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You just don't have enough permission. It also depends on Windows version. On Windows 7 and later (Vista, too, but did it ever existed? Smile | :) ) with its UAC, it's not enough to be logged on as administrator, you still have to run the application under elevated privileges. Please see:[^],[^].
You can avoid exception in all cases, if you request elevated privileges from the very beginning, when you start the application in any way. You can embed appropriate application manifest with this option. Please see:[^].
Note that you cannot avoid UAC dialog requesting for user confirmation, which would defeat the purpose of UAC. You can only switch off confirmation for the system globally, which I would not recommend.
See also:[^].

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100