I recently ran into a problem where I couldn’t read or write to the registry on some Windows computers - especially new ones, or older ones that had their hard drives replaced.
What I found (via an online article) was that some (but not all) Windows Vista installs and later, use Registry Virtualization.
So I wound up using this code:
Dim RegistrySource as String
Dim Reg as RegistryItem
If SystemInformationMBS.IsWindowsVista(True) then // Vista or newer
RegistrySource = "HKEY_CURRENT_USER\\Software\\Classes\\VirtualStore\\MACHINE\\SOFTWARE\\McKernon\\Lightwright6\\Regis"
Else
RegistrySource = "HKEY_LOCAL_MACHINE\\Software\\McKernon\\Lightwright6\\Regis"
End If
Reg = New RegistryItem(RegistrySource)
Does anyone see problems using this method? Or should I switch to using WOW6432Node?