Reputation: 95
I want to show Components based on the existence of a registry key:
[Components]
Name: "MyProgram"; Description: "MyProgram"; Check: RegistryCheck
This is the corresponding function:
function RegistryCheck: Boolean;
begin
Result := RegValueExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Bricsys', 'RegisteredOwner')
end;
I don't know what's the mistake, the installed program which has to be checked is x64, running IS on a x64 machine.
Key:
Rootkey: HKEY_LOCAL_MACHINE
Name: RegisteredOwner
Type: REG_SZ
Data: User
Upvotes: 5
Views: 3039
Reputation: 4929
If you are trying to install on a 64bit OS you may be looking in the wrong RootKey
.
Try using the following instead...
RegValueExists(HKLM64, 'SOFTWARE\Bricsys', 'RegisteredOwner')
Upvotes: 6