Windows Vista Registry Security Restriction

I have a question regarding Windows registry, I am developing a USB driver install shield for Windows Vista, during uninstallation I can not delete the following registry keys and their subkeys.

HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\USB\\Vid_0xxa&Pid_0xxx
HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Enum\\USB\\Vid_0xxa&Pid_0xxx

I don't have privilege to delete them, even I run the application as an administrator, can anyone help me on this issue.



[529 byte] By [Paul525] at [2007-12-24]
# 1

I tried to use the sample code from the msdn library but still doesn't work on Vista....
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/taking_object_ownership_in_c__.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/enabling_and_disabling_privileges_in_c__.asp

It failed when I try to run the SetPrivilege function, and print out I must be logged on as Administrator, but I am log on as Administrator and run the program as an Administrator too. What can I do...

Paul525 at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,General Windows Vista Development Issues...

Software Development for Windows Vista

Site Classified