Access properties\{83da6326-97a6-4088-9453-a1923f573b29} subkey

200 Views Asked by At

In my console application I need to retrive some information about last connected time and last disconnected time about USB devices.

To do this I need to access to properties{83da6326-97a6-4088-9453-a1923f573b29} subkey foreach key in "Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USB\"

Below image explain what I mean and where I'd like to access: enter image description here

What I have tried is below code:

RegistryKey reg = Registry.LocalMachine;
RegistryKey subKey=reg.OpenSubKey(@"SYSTEM\ControlSet001\Enum\USB\ROOT_HUB30\4&2ae8b031&0&0\Properties");

But I have a Security Exception. Any idea?

0

There are 0 best solutions below