windows doesn´t keep track of registry keys 64 bit

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I´m using Inno Setup to install a small program of mine:
[Registry]
Root: HKLM; Subkey: "SoftwareMyProgram"; ValueType: string; ValueName: "mykey"; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWAREMicrosoftWindowsCurrentVersionRun"; ValueType: string; ValueName: "MyProgram"; ValueData: "{app}{#MyAppExeName}"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SoftwareMyprogram"; ValueType: string; ValueName: "myeky2"; ValueData: "{code:us}"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SoftwareMyprogram"; ValueType: string; ValueName: "mykey3"; ValueData: "{code:pw}"; Flags: uninsdeletekey
After that, the program gets those values back, like so:
Dim pKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry64)
pKey = pKey.OpenSubKey("software")
pKey = pKey.OpenSubKey("myprogram")
Mystring = CStr(pKey.GetValue("mykey2"))
Now, this doesn´t work on windows 7 64 bit. Could you please help me with this?
Thanks

View the full article
 
Back
Top