I am running InnoScriptGenerator 1.0.3.1 to create an install script.
Everything works EXCEPT the registry creation. I want to create two entries…
HKEY_LOCAL_MACHINE\SOFTWARE\DocAssist
HKEY_LOCAL_MACHINE\SOFTWARE\DocAssist\InstallDir - which has my install directory
My script lines are as follows:
[Registry]
Root: HKLM; Subkey: SOFTWARE\DocAssist; ValueType: none; Permissions: admins-full; Flags: uninsdeletekey createvalueifdoesntexist;
Root: HKLM; Subkey: SOFTWARE\DocAssist; ValueType: string; ValueName: InstallDir; ValueData: {app}; Permissions: admins-full; Flags: uninsdeletekey createvalueifdoesntexist
The script runs, does not give an error, but also does not create the entry in the registry.
When I run it from InnoScript Generator, the debug log shows

I am running this as an admin user. It is being run on Windows 7 64 bit.
The only other interesting piece of info is that in my application, when it accesses the registry, (via Delphi) I had to define the Registry as…
MyRegistry := TRegistry.Create(KEY_READ OR KEY_WOW64_64KEY);
because
MyRegistry := TRegistry.Create();
just did not work…
Inno (unless you’ve told it otherwise) will be writing that value into the 32bit view of the registry.
You’ve then told your app (using the
KEY_WOW64_64KEYflag) to read formt he 64bit view.As it sounds like your app is actually a 32-bit app, just use HKLM exclusivly, and forget any 64 bit flags.
This will cause the value to be correctly written into
HKEY_LOCAL_MACHINE\SOFTWARE\DocAssistin the 32bit view (which isHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\DocAssistin the 64bit view.)See the various articles on the Microsoft websites for more information.