5

I've developed a .net project and now im doing the installer. My project requires either Microsoft SQL 2008 or Microsoft SQL 2008 Express. I've created a Bootstrapper that installs the Microsoft SQL 2008 Express and it works fine except when someone has Microsoft SQL 2008 already installed. How can i bypass the installation if Microsoft SQL 2008 is already installed?

Edit: This solution works for Microsoft SQL 2008:

<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="AAA">
   <InstallChecks>
      <RegistryCheck Property="IsInstalled" Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" Value="SQL2008" />
   </InstallChecks>

   <Commands Reboot="Defer">
      <Command PackageFile="setup.exe" EstimatedInstallSeconds="15" >
         <InstallConditions>
            <BypassIf Property="IsInstalled" Compare="ValueExists" />
         </InstallConditions>
      </Command>
   </Commands>

   ...

</Product>
jsaye
  • 914
  • 7
  • 12

1 Answers1

3

To be honest I am not an expert in what your trying to do. But would the SQL server discovery report work for you? : SQL server discovery report

or

determine-installed-sql-server-instances

Edit:

I was thinking about something like:

<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="AAA">
   <InstallChecks>
      <RegistryCheck Property="IsInstalled" Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names" Value="SQL" />
   </InstallChecks>

   <Commands Reboot="Defer">
      <Command PackageFile="setup.exe" EstimatedInstallSeconds="15" >
         <InstallConditions>
            <BypassIf Property="IsInstalled" Compare="ValueExists" />
         </InstallConditions>
      </Command>
   </Commands>

   ...

</Product>
Community
  • 1
  • 1
Kevin Hendricks
  • 785
  • 1
  • 8
  • 36
  • I'm not sure if this could be used with the bootstrapper, the bootstrapper contains an xml file which has the rules for the installation. I need to know how to make a rule, that does what I asked. Another thing, may be someone has not set up this feature. – jsaye Jan 04 '13 at 11:30
  • How about this: http://stackoverflow.com/questions/10309861/how-to-force-sqlexpresschk-exe-from-bootstrapper-to-check-for-other-instance-tha ? – Kevin Hendricks Jan 04 '13 at 11:45
  • I've read it, but I agree with the OP. This does not solve the problem at installation time. The clue may be with the tag (with the appropiate property value) or with the tag but i haven't figure it out yet. Thanks for your effort!! – jsaye Jan 04 '13 at 11:52
  • 1
    No problem. I wrote the basic concept I would test in an edit – Kevin Hendricks Jan 04 '13 at 12:11
  • Your welcome, I am glad I could help. Could you post the final solution you used for future visitors? – Kevin Hendricks Jan 04 '13 at 14:03
  • @jsaye: could you post the solution. I have the same iisue – Ajay Unnikrishnan Nov 19 '14 at 13:58