SQL CE 4.0 as a prerequisite InstallShield

I am making my own prq file to install SQL CE 4.0 with installing my WPF application. The installer continues to fail, and I'm not sure why. It looks like he is trying to run CE exe, but then all these command line help options appear in the Windows Installer help window. I click OK, and then he says that the CE installation failed. I do not know how this happens.

Here is my prq file content:

<?xml version="1.0" encoding="UTF-8"?> <SetupPrereq> <conditions> <condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU" FileName="DesktopRuntimeVersion" ReturnValue="4.0.8482.1"></condition> </conditions> <files> <file LocalFile="&lt;ISProductFolder&gt;\SetupPrerequisites\SSCERuntime_x86-ENU.exe" URL="http://www.microsoft.com/download/en/details.aspx?id=17876" FileSize="0,0"></file> </files> <execute file="SSCERuntime_x86-ENU.exe" cmdline="/passive /norestart" cmdlinesilent="/passive /norestart"></execute> <properties Id="{F7BF54C1-CA2C-4410-98DB-480769CE6547}" Description="This prerequisite installs the Microsoft SQL Server Compact 4.0."></properties> </SetupPrereq> 

Any help would be greatly appreciated.

+8
windows-installer sql-server-ce installshield
source share
2 answers

I managed to get it to work with what seems like that

 <?xml version="1.0" encoding="UTF-8"?> <SetupPrereq> <conditions> <condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU" FileName="DesktopRuntimeVersion" ReturnValue="4.0.8482.1"></condition> </conditions> <files> <file LocalFile=".\SSCERuntime_x86-ENU.exe" URL="http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCERuntime_x86-ENU.exe" FileSize="0,0"></file> </files> <execute file="SSCERuntime_x86-ENU.exe" cmdline="/i /passive" cmdlinesilent="/i /passive"></execute> <properties Id="{05DCCDB5-57E0-4314-A016-874F228A8FAD}" Description="This prerequisite installs the Microsoft SQL Server Compact 4.0 x86."></properties> </SetupPrereq> 

x64 script

 <?xml version="1.0" encoding="UTF-8"?> <SetupPrereq> <conditions> <condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU" FileName="DesktopRuntimeVersion" ReturnValue="4.0.8482.1"></condition> </conditions> <files> <file LocalFile=".\SSCERuntime_x64-ENU.exe" URL="http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCERuntime_x64-ENU.exe" FileSize="0,0"></file> </files> <execute file="SSCERuntime_x64-ENU.exe" cmdline="/i /passive" cmdlinesilent="/i /passive"></execute> <properties Id="{05DCCDB5-57E0-4314-A016-874F228A8FAD}" Description="This prerequisite installs the Microsoft SQL Server Compact 4.0 x64."></properties> </SetupPrereq> 
+6
source share

In response to a comment from rishiJasapara, I made scripts based on the previous answer.

The idea is the same to create two scenarios: one for x86 and the other for x64 platform. You should select both prerequisites in your InstallShield project, but with the scripts listed below on the installation page on the target computer, you will see the only one that matches the architecture of the machine processor.

Microsoft SQL CE 4.0 x86.prq:

 <?xml version="1.0" encoding="UTF-8"?> <SetupPrereq> <conditions> <condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU" FileName="DesktopRuntimeVersion" ReturnValue="4.0.8482.1"></condition> </conditions> <operatingsystemconditions> <operatingsystemcondition CSDVersion="" Bits="1"></operatingsystemcondition> </operatingsystemconditions> <files> <file LocalFile=".\SSCERuntime_x86-ENU.exe" URL="http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCERuntime_x86-ENU.exe" CheckSum="0A55733CF406FBD05DFCFF5A27A0B4F7" FileSize="0,2379544"></file> </files> <execute file="SSCERuntime_x86-ENU.exe"></execute> <properties Id="{2754916B-119B-4428-9F94-DC9E45072CCC}"></properties> <behavior Failure="4" Reboot="2"></behavior> </SetupPrereq> 

Microsoft SQL CE 4.0 x64.prq:

 <?xml version="1.0" encoding="UTF-8"?> <SetupPrereq> <conditions> <condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU" FileName="DesktopRuntimeVersion" ReturnValue="4.0.8482.1"></condition> </conditions> <operatingsystemconditions> <operatingsystemcondition CSDVersion="" Bits="2"></operatingsystemcondition> </operatingsystemconditions> <files> <file LocalFile=".\SSCERuntime_x64-ENU.exe" URL="http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCERuntime_x64-ENU.exe" CheckSum="A417082ECAEDD95AFB41F73DC140C350" FileSize="0,2621240"></file> </files> <execute file="SSCERuntime_x64-ENU.exe"></execute> <properties Id="{7CB7BE3C-614A-403F-94D9-5652285A3EDF}"></properties> <behavior Failure="4" Reboot="2"></behavior> </SetupPrereq> 

As you can see, the main difference is the additional “operating systems” that define the correct SQL CE installation package.

I tested it on 32-bit and 64-bit Windows 7 systems, and it really works fine.

+2
source share

All Articles