
ilkka.viinikanoja1.5524915723760881E12 asked a question.
Identifying 64-bit installation in InstallScript?
I have a Basic MSI project where we have two releases defined, 32-bit and 64-bit. The files are separated just fine using release flags for features, but InstallScript custom actions seem a bit more tricky. Is there a way to check if the custom action has been called from a 64-bit installer? So e.g. a property to check to see if I need to pass REGDB_OPTION_WOW64_64KEY to REGDB_OPTIONS when my custom actions are accessing the Registry. I wouldn't like to create duplicate functions just for that.
I guess InstallScript custom actions are otherwise compatible regardless of the bitness? The documentation states that only JScript and VBScript custom actions need to have the 64-bit flag set when using a 64-bit installer.
I think you'd be better off doing what you say you don't want to - create a couple different entry-point functions. All these functions should do is call the "real" function with the REGDB_OPTIONS you want to use. Something like this:function MyX86Version(hInstall)
begin
MySharedVersion(hInstall, REGDB_OPTIONS & ~REGDB_OPTION_WOW64_64KEY)
end;
function MyX64Version(hInstall)
begin
MySharedVersion(hInstall, REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY)
end;