We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

SQL Server CE version prerequisites

Hi :)

I'm building a installer and need to investigated that SQL Server CE 3.5 is present or not.

If anything equal or higher than SQL Server CE 3.5 SP2 is present, then do nothing.
If SQL Sever CE is present and the version is lower than 3.5 SP2 then go to MicroSoft website and install SQL Server CE 3.5 SP2.

Those conditions has to be forfilled before installation completes.
How do I handle this?

Thanks in advance :)
Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

Re: SQL Server CE version prerequisites

If I posted this in the wrong forum my apologies.
If more info or clearification is needed, please let me know I am happy to reply.

Butt I still din't find a solution for this.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SQL Server CE version prerequisites

Hi and welcome to the Advanced installer forums.

I apologize for the delayed reply.

In order to achieve what you want, you can go in the "Prerequisites" page, select "Packages" and select the "SQL Server Compact 3.5 SP2" predefined prerequisite. If you want to add a new prerequisite manually, you can follow the Add Prerequisites tutorial.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

Re: SQL Server CE version prerequisites

Thank you for your reply.

The problem is to install it only under specific conditions.

The conditions are : Only install SQL Server Compact 3.5 SP2 when a lower version of SQL Server CE is present.
So, when no SQL Server CE, SQl Server CE 3.5 SP2 or higher is present then don't install. anything lower (SQL Server CE 3.5 SP1, SQL Server CE 3.5,...) then install SQL Server CE 3.05 SP2.

If I rightclick on SQl Server CE 3.5 SP2 additional package then goto tabpage Install Conditions > Edit is it ok to just set "Comparison" to "Greater then" ?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SQL Server CE version prerequisites

Hi,

The condition set in the "Install Conditions" tab of the "SQL Server Compact 3.5 SP2" predefined prerequisite already meets the requirements that you mentioned. Can you test it and see if it works as you need?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

Re: SQL Server CE version prerequisites

I have a application in C# (AnyCPU), so I need both versions (x64 and x32) of SQL Server CE 3.5 SP2 on a x64 machine.
If I install my package on VM Windows 8.1 x64 with SQL Server 3.5 on it, it goes for the installation of the required package.
It prompt to ask user where to extract (=> this I don't want) and I get a warning about installing both versions.

It places the both versions in the folder I navigate to (test folder), and the stops with the message: " SQL Server CE isn't installed properly".
Attachments
Naamloos.png
Naamloos.png (6.71 KiB) Viewed 11474 times
Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

Re: SQL Server CE version prerequisites

Further more, if SQL Server CE isn't present, SQL Server CE 3.5 SP2 is installed (with above result) and that is not wanted.
As I said before, SQl Server CE 3.5 SP2 may only be installed when a version lower then 3.5 SP2 is present on the target machine.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SQL Server CE version prerequisites

Hi,
It places the both versions in the folder I navigate to (test folder), and the stops with the message: " SQL Server CE isn't installed properly".
Please note that these are archive type prerequisite. They cannot be automatically downloaded from the URL and installed by the main package. You should download them when you configure your project, extract them, then change the prerequisite type to "Use files from disk" and add the extracted "x64" and "x86" package in the project.

Also please make sure that the "x86" prerequisite is added in the list before the "x64" prerequisite because their installation order is important.
Further more, if SQL Server CE isn't present, SQL Server CE 3.5 SP2 is installed (with above result) and that is not wanted.
As I said before, SQl Server CE 3.5 SP2 may only be installed when a version lower then 3.5 SP2 is present on the target machine.
I apologize for my mistake, but I missed that. In order to achieve this, you can add a new install condition like below for each prerequisite:
  • Registry value does not exist - HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\Version
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

Re: SQL Server CE version prerequisites

Hoi Eusebiu,

Thanks for your reply 8-)
I'm gonna test your suggested solution and comeback with my findings :)
Emphyrio
Posts: 7
Joined: Fri Nov 28, 2014 7:55 pm

Re: SQL Server CE version prerequisites

Looks like I have a solution :)
For the sake of other users, I'll do a summary of what I've done.

Preresuisite: SQL Server CE 3.5 SP2, butt install only if the Target machine has a lower version installed.
In all other cases: don't install.

I whend to Prerequisites > Additional packages > Packages.
There I marked the SQL Server CE 3.5 SP2 and let AI downloaded the package to a SQL Server Compact 3.5 SP2 subfolder in the Prerequisites folder .
I unpacked the SSCERuntime-ENU in that folder, so I got both versions (x64 and x86).

A SQL Server CE 3.5 SP2 reference was made under Additional package > Feature-based.
Clicking on this gives me three tabs: Properties - Setup Files - Install conditions.

In the Setup Files tabpage, I marked the "use files from disk" and under the Main Setup file I navigate to the ...\Prerequisites\SQL Server Compact 3.5 SP2\SSCERuntime_x86-ENU.msi file.
Under Addional files I added the SSCERuntime_x64-ENU file.
Under Install Command Lines I added /q in Silent (no UI).

Next to the Install conditions tabpage where I added three conditions:
  • Registry key does not exist - HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition
  • Registry value containing a version - HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU\DesktopRuntimeVersion - (minimum) 3.5.8080.0
  • Registry value with specified content - HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ServicePackLevel - (Value) 2 - (Comparison) Exact match
I also marked the "Install only if all conditions are false"
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SQL Server CE version prerequisites

Hi,

I'm glad you got this working. Thank you for sharing the solution with us, I'm sure it will help other users in the future.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”