PDA

View Full Version : Pre Sales - VB.net/SQL Server 2008 Express



pulsar
01-21-2009, 10:23 AM
Hi,
We have a vb.net application that uses SQL Server 2008 Express. We would like to create an installation package that will install on both XP & Vista platforms, and for people who do not already have SQL Server 2008 Express.

Is this possible using InstallShield, and if so, is it easy?

Also, how large will the final installation file be, as I suspect we would need to inlcude the .net frameworks as well of course SQL Server 2008 Express?

I look forward to your responses.

Many thanks,

hidenori
01-22-2009, 12:33 PM
You simply need to add the Microsoft SQL Server 2008 Express setup prerequisite to your project by selecting the checkbox in the Redistributables view. Microsoft SQL Server 2008 Express requires the Microsoft .Net Framework 3.5 SP1 and Windows Installer 4.5. You may also want to include those prerequisites in your project.

InstallShield provides the Download From The Web option for the setup prerequisites. If you choose this option, only several K bytes of the text files will be included in your setup, and the actual redistributables will be downloaded at run-time. Please refer to the Setup Prerequisites help topic (http://helpnet.acresso.com/robo/projects/isxhelp14/ihelpsetprereqoverview.htm) for more information.

pulsar
01-22-2009, 01:18 PM
Brilliant, I will try that, thanks!

pulsar
01-22-2009, 03:12 PM
Ok, I have selected SQL Server 2008 Express but I can not find anywhere where you create the SQL instance (database name & password).
Can anyone quickly advise where I edit this?

Thanks,

hidenori
01-22-2009, 03:52 PM
Since InstallShield Express edition does not provide the Setup Prerequisite Editor, you need to modify the .prq file using a text editor. You will need to add the "cmdline" attribute to the "execute" node in order to specify the command line options of SQLEXPR32.EXE.

pulsar
01-23-2009, 05:14 AM
I must be going mad but where do I find the .prq file?

hidenori
01-23-2009, 10:21 AM
The .prq files are located under the C:\Program Files\InstallShield\2009 Express\SetupPrerequisites folder.

pulsar
01-23-2009, 12:22 PM
Great, found it, so what line do I enter to create an instance called 'SQLDB'

Thanks,

hidenori
01-23-2009, 12:44 PM
You need to update the "execute" node as follows:


<execute file="SQLEXPR_x86_ENU.exe" cmdline="/INSTANCENAME=SQLDB" requiresmsiengine="1"></execute>

Please refer to the How to: Install SQL Server 2008 from the Command Prompt (http://msdn.microsoft.com/en-us/library/ms144259.aspx) help topic for more information about the command line options of Microsoft SQL Server 2008 setup.

pulsar
01-23-2009, 02:40 PM
Thanks for that, our installation was looking successful until we got the error "Installation requires .net 2.0 SP2"
In our redistributables we are using .net 3.5, I thought .net 2.0 was all included in with 3.5, is it not?

Thanks,

hidenori
01-23-2009, 10:35 PM
We are looking into it. I will post the information as soon as we figure it out.

pulsar
01-26-2009, 11:57 AM
Do you know how long this will take, its just my trial version is coming to an end?

Thanks,

hidenori
01-27-2009, 04:18 PM
I have attahed the prerequisite for Microsoft .NET Framework 2.0 SP2 to this post. Please apply the hotfix by copying the .prq file to the C:\Program Files\InstallShield\2009 Express\SetupPrerequisites folder, and let me know if it solves your issue.

pulsar
01-28-2009, 05:01 AM
I'm afraid that did not work.

After copying that file over as instructed, I was able to select .net 2.0 SP2.
However, when running the installation file, it did not install, there was no error, it just did not appear on the list of pre-installs at the beginning of the installation and simply atempted to install .net 3.5 again. Chjecking the Control Panel/Programmes & Features, there was no .net 2.0 uinstalled.

Also, I attempted to manually install .net 2.0 SP2 but I then got the error saying that I needed .Net 2.0 SP1.

This .net 3.5 installation is becomming a real issue here, is there no .net package that will install all the required componants for .net 3.5?

Just to summerise, we need to distribute SQL Server 2008 Express with the necessary .net componants for it to work on non-vista and vista pc's.

Thanks,

hidenori
01-28-2009, 11:53 AM
Please try Microsoft .NET Framework 3.5 SP1 and see if it solves your issue. The redistributable should install Microsoft .NET Framework 2.0 SP2 as documented here (http://msdn.microsoft.com/en-us/library/ms143506.aspx).

pulsar
01-28-2009, 04:27 PM
Looks like that is working, and its helped to almost install SQL Server 2008 Express, nearly there!
Just when its almost complete installation, the SQL Installation Centre appears. I presume this is something to do with the .prq file.
I am using the following:
<execute file="SQLEXPR_x86_ENU.exe" cmdline="/INSTANCENAME=SQLWINPURE" requiresmsiengine="1"></execute>

I just need to install the SQL Engine, automatically, how do I do that?

I have read http://msdn.microsoft.com/en-us/library/ms144259.aspx#Feature but I can't seem to get this working

Thanks,

pulsar
01-30-2009, 01:51 PM
..could anyone help with this as this is the only thing that is preventing a complete and successful installation?

hidenori
01-30-2009, 01:56 PM
Did you try the /Q switch?

pulsar
01-30-2009, 02:23 PM
I just tried:
<execute file="SQLEXPR_x86_ENU.exe" cmdline="/Q /FEATURES=SQLEngine /INSTANCENAME=SQLDB" requiresmsiengine="1"></execute>


but it then said "The installation of SQL Server 2008 appears to have failed, etc?

hidenori
01-30-2009, 02:29 PM
You may need to update the prerequisite condition for your custom instance as follows:

<condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLDB\MSSQLServer\CurrentVersion"..... ></condition>

pulsar
01-30-2009, 02:40 PM
No, that didn't work either.

Please see below for a copy of my .prq file for SQL Server 2008 Express, what have I done wrong?


<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<conditions>
<condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLDB\MSSQLServer\CurrentVersion" FileName="CurrentVersion" ReturnValue="10.0.1600.22"></condition>
</conditions>
<files>
<file LocalFile="&lt;ISProductFolder&gt;\Objects\SQL2008Express\SQLEXPR_x86_ENU.exe" URL="http://download.microsoft.com/download/c/2/8/c28cc7df-c9d2-453b-9292-ae7d242dfeca/SQLEXPR_x86_ENU.exe" CheckSum="BA1EAFE16FFFCB21DCEA3DC6C4F6E131" FileSize="0,93377552"></file>
</files>
<execute file="SQLEXPR_x86_ENU.exe" cmdline="/Q /FEATURES=SQLEngine /INSTANCENAME=SQLDB" requiresmsiengine="1"></execute>
<properties Id="Microsoft SQL Server 2008 Express RTM (x86 &amp; x64Wow)" Description="This installs Microsoft SQL Server 2008 Express Edition RTM (SQL Server Express) onto both 32-bit and 64-bit (WoW) operating systems. The /q switch suppresses all Setup dialog boxes and error messages. See http://msdn2.microsoft.com/en-us/library/ms144259.aspx for more information." AltPrqURL="http://saturn.installshield.com/devstudio/setuprequirements/sqlexpress2008/Microsoft SQL Server 2008 Express RTM (x86 &amp; x64Wow).prq"></properties>
</SetupPrereq>

hidenori
01-30-2009, 02:42 PM
Did you apply the setup.exe fix posted in this thread (http://community.acresso.com/showthread.php?t=185176)? If it still does not work, try removing the AltPrqURL attribute from the properties node as follows:

<properties Id="Microsoft SQL Server 2008 Express RTM (x86 &amp; x64Wow)" Description="This installs Microsoft SQL Server 2008 Express Edition RTM (SQL Server Express) onto both 32-bit and 64-bit (WoW) operating systems. The /q switch suppresses all Setup dialog boxes and error messages. See http://msdn2.microsoft.com/en-us/library/ms144259.aspx for more information."></properties>

pulsar
01-30-2009, 03:39 PM
Yes, I applied the fixes but to no avail.

My .prq is now as follows, which sadly is failing:

<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<conditions>
<condition Type="32" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLDB\MSSQLServer\CurrentVersion" FileName="CurrentVersion" ReturnValue="10.0.1600.22"></condition>
</conditions>
<files>
<file LocalFile="&lt;ISProductFolder&gt;\Objects\SQL2008Express\SQLEXPR_x86_ENU.exe" URL="http://download.microsoft.com/download/c/2/8/c28cc7df-c9d2-453b-9292-ae7d242dfeca/SQLEXPR_x86_ENU.exe" CheckSum="BA1EAFE16FFFCB21DCEA3DC6C4F6E131" FileSize="0,93377552"></file>
</files>
<execute file="SQLEXPR_x86_ENU.exe" cmdline="/Q /FEATURES=SQLEngine /INSTANCENAME=SQLDB" requiresmsiengine="1"></execute>

<properties Id="Microsoft SQL Server 2008 Express RTM (x86 &amp; x64Wow)" Description="This installs Microsoft SQL Server 2008 Express Edition RTM (SQL Server Express) onto both 32-bit and 64-bit (WoW) operating systems. The /q switch suppresses all Setup dialog boxes and error messages. See http://msdn2.microsoft.com/en-us/library/ms144259.aspx for more information."></properties>
</SetupPrereq>

hidenori
01-30-2009, 03:44 PM
Can you check to see if the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLDB\MSSQLServer\CurrentVersion registry key is created on your target machine?

pulsar
01-30-2009, 04:58 PM
no its not there ?

hidenori
02-01-2009, 11:51 PM
Microsoft SQL Server 2008 Express does not seem to get installed. You may need to specify the /ACTION=Install command line switch. If it still does not work, I would recommend that you will test it from the command line prompt (cmd.exe) and see if you specify the correct command line options to install the database engine silently.