Open registry key using full string path

Is there a chance to open the registry key using the full registry path, for example:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon?

I know that I can open this node using:

RegistryKey.OpenBaseKey(RegistryHive.LocalMachine).OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion\Winlogon")

But I would like to make it easier ... In my application, the user can put the registry key in a string, and my application must do something with it. Now I have to check what is at the beginning and conditionally select the appropriate RegistryHieve. Isn't there a better and easier way to do this?

+4
source share
1 answer

, . . , .

+3

All Articles