combined 64 & 32 bit install

Got a problem you cannot solve? Try here.
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

combined 64 & 32 bit install

Postby SteveRing » Tue Sep 23, 2014 12:15 pm

I have a 32 bit installer that works fine on 32 bit and 64 bit. But, I'd like to change it so that if it's being installed on 64 bit it installs some extra files and writes some extra registry entries into the 64 bit part of the registry. However calling set system 64 etc. seems to have no effect. I have something like the below, and I get the messageBox, but I don't get the registers. I've looked at the native template, but I don't see anything in it that I haven't already tried. So, any hints?

if Variable system64 Equals AMD64
MessageBox: system64, setting 64 bit registers
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Write Registry Key HKLM\SOFTWARE\Cullimore and Ring\\SHARED_LOC, $MYLOCALAPPDATA$ (permanent)
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: combined 64 & 32 bit install

Postby FrancescoT » Wed Sep 24, 2014 12:04 pm

Dear Steve,

Write Registry command is a Windows Installer command (Purple commands)and due of this, it's execution is deferred to Apply Install command execution.

I suggest you to have a look at the following link, where more info about the Purple commands are discussed;
http://www.installaware.com/forum/viewtopic.php?f=2&t=4338

That said, if your code is executed within your project install script sequence and before "Apply Install" statement, it'll not work because you are restoring back the Native 32 bit mode.

If you only need to write some x64 registry Key values, you may use the code you posted, with a NATIVE ENGINE ON/OFF sequence. This will cause the immediate execution of Write Registry command.

Code: Select all

if Variable system64 Equals AMD64
MessageBox: system64, setting 64 bit registers

[Set Variable NATIVE_ENGINE to TRUE

Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Write Registry Key HKLM\SOFTWARE\Cullimore and Ring\\SHARED_LOC, $MYLOCALAPPDATA$ (permanent)
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode

Set Variable NATIVE_ENGINE to FALSE
end


Note! using the above approach, the created Registry Key will be not removed at uninstall (due NATIVE ENGINE the Registry Key creation is not part of the MSI database)... and it must be forcedly delete via script if required.

Hope this helps you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 137 guests