This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Identifying 64-bit installation in InstallScript?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 12, 2011
11:30 AM
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 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.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 12, 2011
01:36 PM
Those flags change the run-mode (probably by changing which Custom Action host is used) for the Windows scripting engine. InstallScript always runs in 32-bit mode. There's no indication here what the package is, although in an immediate-mode action you might be able to determine it.
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:
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;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 12, 2011
03:00 PM
Thanks for the information, MichaelU. Writing all those entry point functions and duplicating the custom actions calling them is much more tolerable when I can keep the "there must be a better way to do this" voices out of my head. At least now I know there isn't 🙂
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)