JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Just wondering, in case it already exists somewhere but built into the .Net framework we have:
Microsoft.Win32.Registry Class
Microsoft.Win32.RegistryKey Class
Microsoft.Win32.RegistryHive Enumeration
As well as the.
My.Computer.Registry
.CurrentUser
.LocalMachine
Etcetera.
Now, If I were to say grab a registry key and execute the ToString() method I would get something like this:
HKEY_LOCAL_MACHINE\Software\MyCompany\MyApplication
The key is the Hive above. Now I can Do:
Microsoft.Win32.Registry.LocalMachine.OpenSubKey
or
My.Computer.Registry.LocalMachine.OpenSubKey
The Hive above is what determines the .LocalMachine, .CurrentUser, .ClassesRoot, etc, which is currently bound within the full string. I have not found any:
.Registry.OpenHive(HiveStringName)
command that would return the RegistryKey class that is pointed to by the LocalMachine or CurrentUser, and I am wondering if I must write the string parser for that myself which interprets the "HKEY_CURRENT_USER" into Registry.CurrentUser or if I'm just looking in the wrong places for it.
Thanks
Microsoft.Win32.Registry Class
Microsoft.Win32.RegistryKey Class
Microsoft.Win32.RegistryHive Enumeration
As well as the.
My.Computer.Registry
.CurrentUser
.LocalMachine
Etcetera.
Now, If I were to say grab a registry key and execute the ToString() method I would get something like this:
HKEY_LOCAL_MACHINE\Software\MyCompany\MyApplication
The key is the Hive above. Now I can Do:
Microsoft.Win32.Registry.LocalMachine.OpenSubKey
or
My.Computer.Registry.LocalMachine.OpenSubKey
The Hive above is what determines the .LocalMachine, .CurrentUser, .ClassesRoot, etc, which is currently bound within the full string. I have not found any:
.Registry.OpenHive(HiveStringName)
command that would return the RegistryKey class that is pointed to by the LocalMachine or CurrentUser, and I am wondering if I must write the string parser for that myself which interprets the "HKEY_CURRENT_USER" into Registry.CurrentUser or if I'm just looking in the wrong places for it.
Thanks