Registering 32 and 64 bit DLL in a single MSI using WiX - windows

I need to create a SINGLE Windows installer that performs the following tasks when it is run on the target m/c:
Runs a service
Registers a 32 bit DLL
Stores the 32 bit and 64 bit log4cxx.dll libraries in C:\Windows\sysWoW64 folder and C:\Windows\system32
Registers a 64 bit DLL
Currently, I am using WiX to create an installer and I am at a point where I can register either 32 bit OR 64 bit installer but not both. Unfortunately, I don't have the option of separating the 32 and 64 bit installer as I need to register both the installers on a 64 bit machine.
I would like to know if there was a way to register both the DLLs in one installer. Thanks in advance.

WiX doesn't support mixed 32/64-bit packages. So the only option is using separate packages:
A 32-bit package for 32-bit systems.
A 64-bit package which installs both 32-bit and 64-bit resources on a 64-bit machine.
Another solution is to use a different setup authoring tool which supports mixed 32/64-bit packages. Perhaps this list will help: http://en.wikipedia.org/wiki/List_of_installation_software

Related

How do I unify two msi installation packages (64bit and 32bit) created by Windows Installer into one?

I created 32-bit and 64-bit installation files respectively with Windows Installer. How can I create a unified installation file that can check the bits during installation, and merge these two into one to install automatically according to the bits?
Heath Stewart: Different Packages are Required for Different Processor Architectures. Here is an extract: "A common question is how to create a Windows Installer package that installs 32-bit binaries on 32-bit platforms, and both 32- and 64-bit binaries on 64-bit platforms. If you’re actually trying to install 64-bit binaries to appropriate directories and write to the 64-bit view of the registry, the short answer is that you can’t build a single package."
You should be able to use a setup.exe creation tool such as WiX's Burn or Advanced Installer or InstallShield (all can create setup.exe launchers). I am unsure of the built-in mechanisms they provide for this at the moment - I haven't looked at it for a while.
In any case you need a 32-bit setup.exe so that it can launch on both 32 and 64 bit systems and inside it you can keep your 64-bit setup along with the 32-bit one.
Rob Mensching's on the topic: How to deploy 64-bit and a 32-bit Windows Installer package as a single setup?.
Here is one of his blogs on Burn: https://robmensching.com/blog/posts/2009/7/14/lets-talk-about-burn/ and here is the normal starting point in the WiX documentation for Burn.
Here is my attempt to show a basic, functional Burn package (many links - too many - towards the bottom).
Links:
Single MSI to install correct 32 or 64 bit c# application
https://www.firegiant.com/wix/tutorial/net-and-net/bootstrapping/

Can I run 64 bit dlls on a 32 bit machine?

I have recently converted My visual studio solution to 64 bit from 32 bit. But, I have 1 machine which is running Windows Server 2003 (32 bit).Can I deploy and run these newly built 64 bit dlls on this 32 bit machine?
Basically, the answer is no.
If the underlying hardware is 32-bit, then it definitely won't support 64-bit instructions.
If the hardware is 64-bit (and the OS is just 32-bit), it's possible in theory, but would require the kernel to not only setup a 64-bit code segment, but to also setup 64-bit paging (I think). Since I doubt the 32-bit Windows kernel supports either of these, then it's not possible.
Yes you can using third party software like
http://www.vmware.com/products/
BUT don't expect much from the performance!

ISAPI Filter not working on Windows 2008 R2 64-bit

I have developed an ISAPI filter which runs fine on 32-bit. I also compiled it for 64-bit using VS2005 cross-compiler. But when I am trying to run it on Windows 2008 R2 64-bit server with IIS-7.5, it does not work. It seems filter dll has been loaded but IIS is not doing anything with it. I used the following command to check this.
tasklist /m mydll*
Any suggestions what
Is there a particular reason you need the DLL to be 64 bit? I've been able to run 32 bit ISAPI filters on a 64 bit machine by doing the following:
Make sure the IIS application pool is set to allow 32 bit applications (this is off by default)
Register the DLL using the 32 bit version of regsvr32: C:\Windows\SysWow64\regsvr32.exe
Verify that the DLL isn't missing any dependencies by using Dependency Walker: http://www.dependencywalker.com/
For 64 bit, the problem is the registry:
The problem I was
for 32 bit the location of apache redirector in registry is:
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
but for 64 bitlocation must be:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
Note the "Wow6432Node".
so just re-create the 32 bit on the Wow6432Node and then you are set.

Including sql server compact in desktop install for win 7 32bit and 64bit

I have a desktop app created in vs10 and am using clickonce install. I must include a database with critical info for the program as part of the install. I am compiling for all versions of windows (32 and 64). But as I understand it, if I include the 32 bit sqlce as part of the installation, it will not work on 64 bit installs. Must I include a 32 bit and 64 bit version of the db and test for windows version before accessing the data? Or is there a simpler solution that I am missing?
You can just include all the required files as content with your app, and it will run for any user and on both x86 and x64 platforms. Just follow the instructions here: http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html

How to create an installer condition that test for 32 and 64 bit Windows

I am creating a visual studio set-up project. I need to test to see if the version of Windows I am being installed on is 64 or 32 bit. I am planning on checking for the existence of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node as a way of telling that I am being installed on 64 bit windows. Is this a good idea and/or is there a better way?
The reason that I want to know which version of Windows I am on is so I can create a directory under either System32 or SysWOW64. I would rather not create two installers one targeting 64 bit platforms and one targeting 32 bit platforms.
The easiest way to check for a 64 bit machine in an MSI installer is to use the VersionNT64 property. This will only be set if the target machine is running a 64 bit operating system.
http://msdn.microsoft.com/en-us/library/aa372497(VS.85).aspx

Resources