I whant to get some Information from the Registry Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration".
For some case I do not get the registry key object. For troubleshooting I've tryed the following:
RegistryKey k2 = Registry.LocalMachine.OpenSubKey("SOFTWARE");
RegistryKey k3 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft");
RegistryKey k4 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Office");
RegistryKey k5 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Office\\ClickToRun");
Debuging the code this is what I've got:
k2 -> correct Object
k3 -> correct Object
k4 -> correct Object
k5 -> null
I have checked the name of the key several times and of course the key exists on the system.
When I search SubKey k4 like that:
foreach (string test in k4.GetSubKeyNames()) {
test.ToString();
}
I can't find the key "ClickToRun" but I can find some keys that aren't shown with regedit. Tested the code with other registrykeys, it works fine.
Any ideas?