More details on \"Set 64 Bit Mode\" command
More details on \"Set 64 Bit Mode\" command
Is "Set 64 Bit Mode" a special MSI command? Or does this command immediately turn off WOW64 file/registry redirection?
For example, if in one portion of the script, I'd like to read from the 64-bit (non-redirected) portion of the registry, would the "Set 64 Bit Mode" command enable me to do this?
Would I just:
Set 64 Bit Mode (x64) // turn off redirection
Read Registry...
Set 64 Bit Mode (x86) // back to normal
Thanks,
Troy
For example, if in one portion of the script, I'd like to read from the 64-bit (non-redirected) portion of the registry, would the "Set 64 Bit Mode" command enable me to do this?
Would I just:
Set 64 Bit Mode (x64) // turn off redirection
Read Registry...
Set 64 Bit Mode (x86) // back to normal
Thanks,
Troy
Yes, it works as you describe in your sample.
Note that the IA default scripts for e.g. .net framework x64 will stop the installation when the installer is run on x86.
If you want to make a single installer which includes both x64 and x86 versions of those runtimes, you need to make changes in both versions.
Note that the IA default scripts for e.g. .net framework x64 will stop the installation when the installer is run on x86.
If you want to make a single installer which includes both x64 and x86 versions of those runtimes, you need to make changes in both versions.
Re: More details on \"Set 64 Bit Mode\" command
We have encountered a problem with the Set 64 Bit Mode:
On a virtualized Windows 2008 x64 Enterprise, the follwing script does not work:
The Registry value does not get written to the 64-bit branch of the registry. More exactly, it does not get written at all.
Info: The installer is a 32-bit installer and we try to switch to 64-bit mode to write to the 64-bit branch of the registry. Setup is started with admistrator rights.
Is this a bug ?
Any help is greatly appreciated.
On a virtualized Windows 2008 x64 Enterprise, the follwing script does not work:
Code: Select all
Set 64 Bit Mode (x64) // turn off
Write Registry...
Set 64 Bit Mode (x86) // back to normal Info: The installer is a 32-bit installer and we try to switch to 64-bit mode to write to the 64-bit branch of the registry. Setup is started with admistrator rights.
Is this a bug ?
Any help is greatly appreciated.
Re: More details on \"Set 64 Bit Mode\" command
Write registry (and all pinkish commands) will not be run until Apply Install (Apply Changes). In fact, it's the Apply Install that you want to set the 64 bit mode on.
The following should do the trick:
The following should do the trick:
Code: Select all
Write Registry Key HKLM\SOFTWARE\test\test, test
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Apply Install
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation modeAndy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: More details on \"Set 64 Bit Mode\" command
Thank you.mills wrote:Write registry (and all pinkish commands) will not be run until Apply Install (Apply Changes). In fact, it's the Apply Install that you want to set the 64 bit mode on.
The following should do the trick:Code: Select all
Write Registry Key HKLM\SOFTWARE\test\test, test Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode Apply Install Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
One more question: I'v read in other posts, that calling apply install twice could mess up the uninstall process. Do you see any problems here ?
Re: More details on \"Set 64 Bit Mode\" command
Generally, you should only need to call Apply Install once. The pinkish commands do stack to the windows installer. So, the second Apply Install call will apply any pinkish MSI commands that were called in the first Apply Install, because a list is basically generated in the MSI table. There's no sense in duplicating that work...
In my example, I added a second Apply Install after the switch back to 32-bit mode. That effectively created another entry under the wow6432Node tree. However, that was the entry that was removed during Uninstall (not the initial, 64-bit entry; it still remained).
If you realize a need to run multiple Apply Installs, what seems to be the most common approach is to create unique installers for each set of commands you want to run under a give Apply Install, treating them as individual "products" (i.e. make sure product codes don't match). From your main installer, you can call the other installers with Run Program and run them silently.
In my example, I added a second Apply Install after the switch back to 32-bit mode. That effectively created another entry under the wow6432Node tree. However, that was the entry that was removed during Uninstall (not the initial, 64-bit entry; it still remained).
If you realize a need to run multiple Apply Installs, what seems to be the most common approach is to create unique installers for each set of commands you want to run under a give Apply Install, treating them as individual "products" (i.e. make sure product codes don't match). From your main installer, you can call the other installers with Run Program and run them silently.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: More details on \"Set 64 Bit Mode\" command
Now I think I do understand the approach. Thanks for explaining ! 
Re: More details on \"Set 64 Bit Mode\" command
What if my 64-bit app installer needs to write some registry key/value in WOW6432NODE (and also in the normal one)? In this case, I would still need to call APPLY INSTALL twice, right?mills wrote: If you realize a need to run multiple Apply Installs, what seems to be the most common approach is to create unique installers for each set of commands you want to run under a give Apply Install, treating them as individual "products" (i.e. make sure product codes don't match). From your main installer, you can call the other installers with Run Program and run them silently.
Thanks,
Re: More details on \"Set 64 Bit Mode\" command
Yes, you will need to make 2 calls.
I ran a test, to see if two calls to Apply Uninstall would clear up the distinct bit-mode calls. It didn't work.
For the cleanest installation (and uninstall) of the 64bit and 32bit work, you'll need 2 installers.
I created one called 64bitWork. The first line I set to
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
The only work it does is:
Write Registry Key HKLM\SOFTWARE\test\test, test64
Nothing else was changed.
I created a second installer called 32bitWork and added 64bitWork.exe as an installable file.
It writes an entry to registry (in wow6432Node) and also calls the 64bitWork installer.
Its code looks like this: It's important to call the other installer after the apply install and before the apply uninstall
I verified both registry entries were properly installed and uninstalled when the 32bitWork (parent) installer was installed/uninstalled.
I ran a test, to see if two calls to Apply Uninstall would clear up the distinct bit-mode calls. It didn't work.
For the cleanest installation (and uninstall) of the 64bit and 32bit work, you'll need 2 installers.
I created one called 64bitWork. The first line I set to
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
The only work it does is:
Write Registry Key HKLM\SOFTWARE\test\test, test64
Nothing else was changed.
I created a second installer called 32bitWork and added 64bitWork.exe as an installable file.
It writes an entry to registry (in wow6432Node) and also calls the 64bitWork installer.
Its code looks like this: It's important to call the other installer after the apply install and before the apply uninstall
I verified both registry entries were properly installed and uninstalled when the 32bitWork (parent) installer was installed/uninstalled.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: More details on \"Set 64 Bit Mode\" command
Thank you for the detailed explanation and the code example. This is very helpful.
Have a nice weekend.
Have a nice weekend.
Re: More details on \"Set 64 Bit Mode\" command
Hello Andy,
I have one more question on the example you provided. How do I prevent both program from appearing in the Windows Add and Remove Program list. I only want one of them (the one that installs the real product) to appear in the Windows Add and Remove Program list.
Thanks,
Kevin
I have one more question on the example you provided. How do I prevent both program from appearing in the Windows Add and Remove Program list. I only want one of them (the one that installs the real product) to appear in the Windows Add and Remove Program list.
Thanks,
Kevin
Re: More details on \"Set 64 Bit Mode\" command
I haven't tested it, but you may be able to remove a key from the registry. See:
http://www.annoyances.org/exec/show/article05-009
I'm not sure if that will prevent you from properly uninstalling the product that you don't want to appear in add/remove programs. You may have to resort to "manual" deletions.
http://www.annoyances.org/exec/show/article05-009
I'm not sure if that will prevent you from properly uninstalling the product that you don't want to appear in add/remove programs. You may have to resort to "manual" deletions.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

