Click here to Skip to main content
Rate this: bad
good
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
v2
Comments
Sergey Alexandrovich Kryukov at 22-Apr-13 2:56am
   
There is no such thing as "regedit key"... :-)
—SA
Jochen Arndt at 22-Apr-13 2:57am
   
See this link if you want to remove drivers of old USB devices: http://www.faqforge.com/windows/uninstall-usb-drivers-on-windows-7/. By uninstalling the driver, all related information is also removed from the registry.

1 solution

Rate this: bad
good
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:
http://4sysops.com/archives/vista%E2%80%99s-uac-8-ways-how-to-elevate-an-application-to-run-it-with-administrator-rights/[^],
http://www.sevenforums.com/tutorials/11841-run-administrator.html[^].
 
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:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].
 
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: http://en.wikipedia.org/wiki/User_Account_Control[^].
 
—SA
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 130
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2014
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