[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How do install SQL EXPRESS 2008 with NSIS

Posted on 2009-02-24
Medium Priority
Last Modified: 2012-05-06
Hi All,

I am looking for help with installing sql express 2008 with nsis silently, i have a database and app that will also be deployed in the same package. I have looked all over the net but there are many convaluted essays on how to achieve this but very few give good solid examples.

My app is purely for holding data and using lookup tables everything elses is inside the application.

Please could someone show a good example of how to delploy sql express silently using nsiss and setting up the ini file etc. im aware of the pre-requisuits such as DotNet 2 so that ins't required.

Many thanks

Question by:Zeus2009
  • 2
LVL 57

Accepted Solution

Raja Jegan R earned 750 total points
ID: 23721478
Just follow the Unattended installation steps of SQL Server Express edition along with your NSIS setup.


That's it, Just configure the ini file and feel easy with your SQL Server Express 2008 installation.

Author Comment

ID: 23723013
I will have a look at that tonight and report back.



Expert Comment

ID: 24916331
How do you test if it is already installed?

Thank you.

Author Comment

ID: 24916570
Hi using nsis,

check for a registry entry for sql express etc or a dll that belongs to sql express and check the version you are installing is newer than one that is installed (if it is installed already)

 Section 'Windows Installer 3.1' SEC02 #NOTE should be installed before NET and stuff

  GetDLLVersion '$SYSDIR\msi.dll' $R0 $R1
  IntOp $R2 $R0 / 0x00010000 ; $R2 now contains major version
  IntOp $R3 $R0 & 0x0000FFFF ; $R3 now contains minor version
  IntOp $R4 $R1 / 0x00010000 ; $R4 now contains release
  IntOp $R5 $R1 & 0x0000FFFF ; $R5 now contains build
  StrCpy $0 '$R2.$R3' ;.$R4.$R5' ; $0 now contains string like ''
    ${if} $R2 < '4'
        ${if} $0 != '3.1'
     SetOutPath '$INSTDIR'
     SetOverwrite on
     ;file work
        MessageBox MB_ICONINFORMATION|MB_OK "BRiCS Installer will now update your system installer,this may take 10 minutes, please be patient.."
     File 'C:\Users\Cup\Documents\Visual Studio 2005\Projects\BRiCS (PMP)\BRiCS (PMP)(Working On)\BRiCS Installer\Install Files\Windows Installer 3.1\WindowsInstaller-KB893803-v2-x86.exe'
     ExecWait '$INSTDIR\WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart' $0
     DetailPrint '..MSI 3.1 exit code = $0'
     Delete '$INSTDIR\WindowsInstaller-KB893803-v2-x86.exe'
     DetailPrint '..MSI $0 already installed !!'
    DetailPrint '..MSI $0 already installed !!'

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question