how to check sql version in wix - wix

Is there any way to find the sql server is 64 bit or 32 bit in machine using wix.
I am building the wix in visual studio 2010.Based on configuration the installer will install. At install time it will check sql is 64 or 32. If OS is 64bit but 32 sql is installed my installer will install.
Thanks,
Rajeev Kumar.

To detect if the target machine is 32-bit or 64-bit you can use VersionNT64 property. This property can be used as a launch condition to stop the 32-bit package from installing on a 64-bit machine. A 64-bit package cannot run on a 32-bit machine and is stopped automatically.
For detecting SQL Server there are multiple approaches. For example you can search for registry values or use a custom action. Perhaps this article will help:
http://blogs.msdn.com/b/sqlexpress/archive/2006/07/29/682254.aspx

Related

SQL Server 2014 Express .MSI for LocalDB failed to install on a target vm

Post was rewritten after additional investigation. The error message was:
Installation of this product failed because it is not supported on this operating system. For information on supported configurations, see the product documentation.
The installation target is a Hyper-V guest machine as follows: 2G RAM, 14.5 GB free on the C: drive, 2.5 GHz CPU. .NET 3.5 is turned on.
On this page https://www.microsoft.com/en-us/download/details.aspx?id=42299 the following note was confusing to me (bold is my emphasis):
Note: Microsoft® SQL Server® 2014 Express includes both 32-bit and 64-bit versions. SQLEXPR32_x86 is a smaller package that can be used to install SQL Server 2014 Express onto only 32-bit operating systems. SQLEXPR_x86 is the same product but supports installation onto both 32-bit and 64-bit (WoW) operating systems. SQLEXPR_x64 is a native 64-bit SQL Server 2014 Express and supports installation onto only 64-bit operating systems. There is no other difference between these packages. Microsoft® SQL Server® 2014 Express is not supported on IA64 systems.
The wording seemed to indicate the x86.exe would work on both 32/64 bit systems which was consistent with my findings. But I thought that also indicated the 32bit.msi would also work on both 32/64 bit systems. I am beginning to believe I misunderstood and would appreciate confirmation the error is my reading of the note.
Your error message answers your question. Your trying to install it on an unsupported OS. Check out https://msdn.microsoft.com/en-us/library/ms143506(v=sql.120).aspx which lists the requirements. It appears that in a Hyper-V Environment all versions of SQL 2014 are only supported on a Windows 2008 SP2. 2008 R2 SP1, or 2012 OS.
My particular problem was the misunderstanding that the 32 bit MSI would work on a 64 bit OS. Once I changed to the 64 bit MSI SQL Express 2014 loaded just fine into the VM. The 32 bit x86 .exe setup file did in fact work on the 64 bit OS, just not the MSI setup file.
Note there are two different _x86 file names: SQLEXPR32_x86 only works on 32-bit systems. SQLEXPR_x86 (note the missing "32") will work on both 64-bit and 32-bit systems, but still runs as a 32-bit process.

using 32 bit SQL server ODBC on 64 bit system

Microsoft has a SQL server either as 32 bit or 64bit, however the 64bit contains both 32bit AND 64 bit.
are there any MSI packages containing the 32 bit AND 64 bit version of the ODBC connector ?
i.e. the install package decides by itself which version to install`?
Unfortunately, MSI is not very good at providing a single installer that works for both 32-bit and 64-bit systems. The 32-bit installer will not be able to write to the locations where the 64-bit files should be stored, and the 64-bit installer will not start on a 32-bit system.

Detecting if SQL Server Compact Edition 3.5 SP2 x64 is installed?

I am building an installer and I want to bootstrap SQL Server Compact Edition 3.5 SP2. The problem is that I am looking for the registry key HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU\DesktopRuntimeVersion. The reason that is a problem is that for 64-bit machines SQL CE requires that both the 32-bit and 64-bit installers are run. You can't install the 64-bit version until the 32-bit version is installed.
As soon as the 32-bit version is installed the registry key is populated and my bootstrapper, dotNetInstaller detects that the registry key is there and the x64 version is never installed.
Any ideas on how to tell if the x64 version is installed even if the x32 is installed?
x64 system with only x86 runtime installed:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU]
"DesktopRuntimeVersion"="3.5.8080.0"
"DesktopRuntimeServicePackLevel"="2"
x64 system with both x86 and x64 installed:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU]
"DesktopRuntimeVersion"="3.5.8080.0"
"DesktopRuntimeServicePackLevel"="2"
"DesktopRuntimeVersion_x64"="3.5.8080.0"
Some code test whether SQL CE 3.5 SP2 is installed using MSBuild:
<PropertyGroup>
<SSCE35sp2Installed Condition="'$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU#DesktopRuntimeVersion)' == '3.5.8080.0' And '$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU#DesktopRuntimeServicePackLevel)' == '2'">true</SSCE35sp2Installed>
<SSCE35sp264Installed Condition="'$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU#DesktopRuntimeVersion_x64)' == '3.5.8080.0'">true</SSCE35sp264Installed>
</PropertyGroup>
I'm not sure how many of the registry values need to be checked. For example should the Wow6432Node DesktopRuntimeServicePackLevel value be checked in addition to the above?

Is it possible to target x64 .msi with WiX on a 32bit machine?

I'm developing SharePoint solutions on a virtual 32bit machine, and I use Wix to package the setup.
I'm targeting both 32bit and 64bit environments with my solutions, but in order to create 64bit MSI's, I need to have have a 64bit machine and the 64bit version of WiX.
Normally, this wouldn't be an issue, since I would have just simply use a 64bit dev environment.
But there are some issues with developing SharePoint solutions on a 64bit platform, which more or less forces me to develop on the 32bit platform.
Because of that, I can't create a 64bit MSI's, unless I copy the source files to a 64bit machine just to build the 64bit MSI, which feels a little bit cumbersome.
Is there any trick to flag/build the 64bit MSI package on my 32bit dev box, if it's even possible?
You do not need to run a 64-bit development machine to create a 64-bit MSI file.
What makes an MSI file "64-bit" is simply that the "Template Summary" field in the Summary Information Stream is set to "AMD64;1033" (one possible example) instead of "Intel;1033".
This MSDN article might provide you more information.
AFAIK the Wix tools set is agnostic to platform, you need to install the x64 version, and you need to use the proper flags inside the setup (there are various of places you need to be explicit about x64, more info here).

Does a 64-bit CruiseControl.NET exist?

Does a 64-bit CruiseControl.NET exist or do I need to install the 32-bit version? Our CI server is Server2003 64-bit. Currently I have been testing on WinXP Pro and no problems.
If I do need to run cc.net 32-bit on a 64-bit OS, what issues should I expect to encounter? This post mentions a couple, Running 32-bit ASP.NEt 3.5 apps in Windows 2003 64-bit . I would also need to have the .NET 2.0 and 3.5 framework installed. Do I install the 32-bit versions if running cc.net 32-bit? Can 32-bit and 64-bit coexist on the same server?
A quick peek at the source code reveals that CruiseControl.NET is compiled with "Any CPU" platform, so it will (and does) run on either a 32 or 64 bit runtime.
My notebook runs 64 bit O/S and has no problems with CruiseControl.NET server or web dashboard (IIS 7). Just install it as per normal and you should be fine.
Personally I'd be really worried if it needed > 3GB of memory :)
It shouldn't be anything you need to worry about. Cruise control just launches the build, subsequent steps such as compilation can be 64-bit.
I don't think there's much benefit from making CruiseControl 64-bit at the moment. I'm running CruiseControl without issues on a 64-bit machine. The setup was not much different, other than the folder which it was installed into (Program files (x86)).
Generally speaking, all 32bit applications will work on a 64bit OS. I have been doing this with my webapps for some time. You will encounter issues only if you are trying to reference assemblies across the bit boundary, ie. 64bit assembly from 32bit application.
You should be already to run CC on 32bit mode on 64bit OS.
There are no seperate version of CruiseControl for 64-bit. But but you may run into an ASP.NET error if working with Win. Server 2008 and IIS7.
Workaround:
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe" -i
and
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe" -i "W3SVC/1/ROOT/ccnet"
NOTE: it is using Framework64 as this would not work for 32-bit.