It seems like there are some "smart" keys in the windows registry. When I say smart...I mean that they are there (RegEdit sees them) but if you perform a search you won't find them (via OpenSubKey/GetSubKey routines).
Case in point:
The registry has the following key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\044A7038A79602FACF77629B3A9FFA16
If you Use the OpenKey/GetSubkey method you will get the 6 subkeys NONE of which is key
044A7038A79602FACF77629B3A9FFA16
.
I wish to build a file of keys added during a install, and then go and delete them. Why? Because when the installer runs it installs just fine, but you cannot uninstall my application.
In order to perform deletion and cleanup, I must find the keys first.
What I have tried:
I've tried the following
TopKey = CurrentKey.OpenSubKey(fullpath, RegistryKeyPermissionCheck.ReadSubTree, Lrights[K]);
Where CurrentKey is
HKEY_LOCAL_MACHINE
opened via both 64 bit and 32 bit, and
Lrights[K]
is all the enumerate rights of
System.Security.AccessControl.RegistryRights
I'm running in the debugger with Administrative rights.
The code to open the initial HKEY_LOCAL_MACHINE is:
RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry32);
or
RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64);