I'm writing merge modules for a project I'm working on.
I build two merge modules, one for 32-bit and one for 64-bit. I want to include them in a WiX installer but it tells me I can't:
error LGHT0345: 'installer\bin\x64\Release\en-us\myproject.msm' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.
Is there a way to make a dual CPU project so I can include both?
WiX version is 3.6.
Windows Installer doesn't support multi-platform packages. If you need to write to the 64-bit portion of the file system or registry, you need a 64-bit package.
Related
.Net Assemblies built with AnyCPU will JIT to 64-bit code when loaded into a 64-bit or 32-bit process based on the CPU. I am creating a WiX installer.
What should be the default path (Program File x86/Program File) for the components built with AnyCPU option? Shall the installer check the platform and set the appropriate path or are there any other ways to handle it?
At this point in time, I'd recommend installing to ProgramFilesFolder (Program files (x86)) as that is present on both 32-bit and 64-bit computers. 32-bit is the closest thing (at this time) Windows has for "Any CPU".
Note: This does change as WOW is removed from 64-bit Windows. You can already remove the WOW subsystem from Windows Server, in which case you need to provide a package that targets the appropriate architecture. It isn't clear if/when WOW will be removed from Windows client.
I have Wix Installer for my 32-bit Application i.e. it always set up the files in Program Files(x86). SO when the user installs it on the 32-bit machine I want to remove some of the dlls from it.
I am not registering any values in Registry and don't want to that way. Is there any other way than this?
Yes, you do need separate MSI files for 32-bit and 64-bit, assuming that you have 64-code that you want to install and run. 32-bit apps will install on 64-bit systems and run in 32-bit mode, but it appears that you have 64-bit Dlls.
This is a good outline of why you need two installs:
https://blogs.msdn.microsoft.com/heaths/2008/01/15/different-packages-are-required-for-different-processor-architectures/
For example there are different folder locations such as ProgramFilesFolder for 32-bit program files and ProgramFiles64Folder for 64-bit setups.
and this link:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa367451(v=vs.85).aspx
points out that 32-bit packages can contain only 32-bit components, and 64-bit packages can contain 64-bit and some 32 bit components.
What are all the things we should take care of while writing a WiX installer for 64-bit software?
What if I want to support both 32- and 64-bit versions?
I want to release one version of the installer, that will be possible to install softwares for both platforms, according to the host OS.
Separate MSIs for separate architectures:
http://blogs.msdn.com/b/heaths/archive/2008/01/15/different-packages-are-required-for-different-processor-architectures.aspx
and people use a WiX bundle to choose which depending on the system.
You can have a common source file for both MSIs, this kind of thing:
http://blogs.msdn.com/b/astebner/archive/2007/08/09/4317654.aspx
http://alekdavis.blogspot.com/2011/05/build-32-and-64-bit-installers-using.html
I've had the pleasure of not having to work with InstallShield very much, so I appreciate the answer to this is will be extremely simple, or more than likely, there is not much I can do about it (unless I compile my own MSM package?), but with the MSM Merge Modules, I have selected to use Visual C++ 9.0 MFC (x86) WinSXS MSM, version only states as 9.0, but getting a "SideBySide" error to say the version for 9.0.21022.8 is not found when the end user is trying to run the product.
With having 4 different flavours of version 9 in my C:\Windows\winsxs folder, I presume its not using the desired one of the version above, but there is no way to validate this in the properties of what is selected in InstallShield.
How can I either specify the selected MSM module is to use the set version of the files that is within the 9.0.21022.8 folder, or where can I find a MSM I can download to install over the top in InstallShield?
Thanks.
I suppose those 4 merge modules would be :
ATL,
CRT,
MFC,
MFCLOC,
OpenMP.
May be the sxs error can be corrected if you install the x86 merge mods for a 32 bit installation
and install both x86 and x64 merge mods for a 64 bit installation.
I'm using WiX to deploy my application. This application uses a registry key which is shared between x64 and x86 processes. Thus it must not use the Wow64Node. The application uses the KEY_WOW64_64KEY flag to achieve this.
But how can this be done using an MSI build with WiX? Currently I use an x86 and an x64 version of the installer, but that gives me a large overhead. Is it possible to disable registry redirection in WiX? I found the DisableRegistryReflection attribute, but that does not seem to have influence on redirection. Another idea would be to merge the two installers into a single file, like it is possible with languages. But I have in mind that that's not supported.
This could be done with an unified 32/64-bit package, but WiX doesn't support it. Some commercial setup authoring tools support it.
When using separate packages, 32-bit installers will use the 32-bit location on 64-bit systems. So to avoid registry redirection you should distribute a 32-bit package for 32-bit systems and a 64-bit package for 64-bit systems.
In 64-bit installers the registry entry component needs to be marked as 64-bit. In WiX you can do this by setting Win64 to "yes" for your registry components.