Search code examples
winformsvisual-studio-2013sql-server-2012installshield-2010

Deploying SqlLocalDb 2012 using Installshield


I've made a simple application using windows forms that uses SqlLocalDb 2012, I want to create an installation file using InstallShield that should check wether SqlLocalDb 2012 is installed or not, if not I want to silent-install it to the client machine.

I couldn't figure out the way to check and include the SqlLocalDb msi(es) to my installation project.

It's the first time I use InstallShield and I couldn't find any tutorial that would guide through the process. Any suggestions?

Thank you in advance.


Solution

  • The approach I would suggest depends on your project type, but the first approach below fits most cases pretty well.

    • For Basic MSI projects or InstallScript MSI projects, I would suggest creating and using an InstallShield prerequisite. (This assumes you have at least the Professional edition, or requires finding a .prq file that someone else has created.) Armed with the name InstallShield prerequisite, you should be able to find a tutorial on creating and using them.

    • If you are using an InstallScript project, you could implement the check and application launch manually, or if your version of InstallShield supports prerequisites in InstallScript projects, just use the same approach.

    • In later versions of InstallShield with Advanced UI projects or Suite/Advanced UI projects, you can import the previously created prerequisite (or possibly create an equivalent) as a dependency package.

    In all cases you will need to know how to detect the package; for .msi packages this is typically pretty straightfoward, but it may depend on the vendor's servicing mechanisms whether you should look for a product code, an upgrade code, or some other artifact.