Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup does not seem to write to the registry on a 64-bit machine

I have a very simple Inno Setup script containing this [Registry] section:

[Registry]
Root: HKLM; Subkey: SOFTWARE; Flags: createvalueifdoesntexist; ValueType: string; ValueName: ABC; ValueData: abc

However, when I check the HKLM\SOFTWARE subkey, there is no value added.

I tried different subkeys under the HKLM\SOFTWARE and Pascal scripting, but Inno Setup simply refuses to create a new subkey or value.

I am running a 64bit Windows 7, the UAC is turned off.

like image 799
Libor Avatar asked Oct 18 '12 14:10

Libor


1 Answers

Finally solved it.

Inno Setup was running as 32bit on a 64bit machine, hence HKLM correspond to HKLM\Wow6432Node.

I need to add check for IsWin64 and use HKLM64 in that case. I think the syntax should be:

Root: HKLM64; ... <Subkey, Flags, etc.> ... Check: IsWin64

like image 107
Libor Avatar answered Nov 11 '22 16:11

Libor