I have SQL Express 2012 installed and there isn't a \InstanceNames\ in the 
registry so that would fail for SQL EXPRESS

 -----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com] 
Sent: November-14-12 11:45 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Help?

Here is the code to detect whether your instance is installed:

    <?define InstanceName = "TEMP" ?>

    <!-- Read SQL Server keys to find current instance and version -->
    <util:RegistrySearch
      Id="SqlInstanceFound"
      Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance 
Names\SQL" Value="$(var.InstanceName)"
      Result="exists" Variable="SqlInstanceFound" />

    <util:RegistrySearch
      Id="SqlInstanceKey"
      Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance 
Names\SQL" Value="$(var.InstanceName)"
      Variable="SqlInstanceKey" After="SqlInstanceFound" 
Condition="SqlInstanceFound" />
    <util:RegistrySearch
      Id="SqlVersion"
      Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL 
Server\[SqlInstanceKey]\Setup" Value="Version"
      Variable="SqlVersion" After="SqlInstanceKey" Condition="SqlInstanceFound" 
/>

This will set two variables SqlInstanceFound if the instance is present and 
SqlVersion is the SQL version of the instance (you might not need the second 
one but it is useful if you want to upgrade existing instances. Note: this 
detects the 32 but instances if you want 64 bit you would need to set the Win64 
attribute.

To install SQL can use if the SqlInstanceFound variable in your ExePackage 
element e.g. ExePackage/@DetectCondition="SqlInstanceFound" 

Neil

-----Original Message-----
From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com]
Sent: 14 November 2012 16:17
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Help?

I would suggest starting with WixStdBA. You should be able to configure the 
bundle with a few DirectorySearch/FileSearch/RegistrySearch/ProductSearch 
elements and then use the InstallCondition to tell the Exe/Msi package to 
install and mark it as Permanent so that uninstalling doesn't remove it.



-----Original Message-----
From: Chad McCune [mailto:c...@selerix.com]
Sent: Wednesday, November 14, 2012 9:59 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Help?

I'm new to WiX, started playing with it last week.  

 

Our current software installer works, but has issues.  We are going to be 
moving to VS2012 soon, and the MS Setup Project is no longer available, so I 
was going to take this opportunity to update and improve it.

 

Scenario: Like most software, we have pre-requisites.  We require .NET 
Framework for one.  We currently also depend on a SQL Server Express instance 
to be installed and configured. We're also investingating using the new 
SqlLocalDB option from 2012 for users using a supported OS.

 

I've got my basic installer created (product.wxs) and it checks for the 
prerequisite of .NET.  This basic MSI works fine.

 

I've got a basic Bootstrapper project setup that will install .NET and then my 
MSI.  This basic bootsrapper works fine.

 

Where I've ran into a huge roadblock, is how to conditionally install SQL.  

 

I only want to install SQL if the instance is not already installed, or for 
some reason, the service won't start (ie. the user ran the desktop cleanup 
wizard that compressed their program files).  This is also where I'm trying to 
decide between using SQL Express and SQLLocalDB.

 

To do this, do I have to create a custom BA?  Can I use a wix extension instead?

 

I've tried both, but I think the extension was not the right way to go.
However, screwing around with the BA, I can get it to compile and my BA
starts, but it just seems to hang.   

 

 

       public class CustomBA : BootstrapperApplication

    {

              protected override void Run()

              {

                     this.Engine.Log( LogLevel.Verbose, "Running the CustomBA." 
);

                     Threading.Dispatcher.Run();

 

                     MessageBox.Show( "Dispatcher Run has finished." );

                     

                     this.Engine.Quit( 0 );

              

              }

    }

 

I see the entry "Running the CustomBA" in my log file, but nothing else after 
that.

 

What all do I have to do to create my own BA?  Do I have to completely recreate 
the entire UI experience? 

 

Short version, I just want to create some custom conditionals that I can use in 
my "DetectCondition" attribute, ie. <ExePackage blablabla 
DetectCondition="IDONTHAVESQL" />.  What is the "best" way to accomplish this.

 

Please Help! J

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web 
console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud 
infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web 
console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud 
infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web 
console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud 
infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to