EDN Admin
Well-known member
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: "{codew}"; 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
[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: "{codew}"; 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