I'm using WiX 3.8 to create a Boot Strapper and have added a new EditBox to
the Options page, to allow the user to enter a database instance name and I
use this to install SQL Express 2014 and create an instance for the user. 
This works fine !  

In bundle.wxs :

    <Variable Name="txtDBInstance" Type="string" Value=""
bal:Overridable="yes" />

In my Theme xml file, for the "Options" page :

    <Editbox Name="txtDBInstance" X="114" Y="-43" Width="150" Height="21"
TabStop="yes" FontId="3">[txtDBInstance]</Editbox>

Then in the ExePackage part of my SQL Server fragment (cut-down for brevity)
:

    <ExePackage Compressed="no"
                DetectCondition="SqlInstanceFound_x64"
                DisplayName="Installing SQL Server Express 2014"
                Id="SQLServerExpressInstall_x64"
                InstallCommand='/Q /ACTION=Install
/INSTANCENAME=[txtDBInstance]              />

But I also want to check the registry to see if an instance already exists
with that name and if so update that instance.  I have a series of
Util:RegistrySeach elements, that work ok if I hard-code the name of the
instance to check for e.g. if one was called "MY_DBINSTANCE" :

            <util:RegistrySearch Id="SqlInstanceKeyFound_x64"
                  Root="HKLM"
                  Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance
Names\SQL"
                  Value="MY_DBINSTANCE"
                  Result="exists"
                  Win64="yes"
                  Variable="SqlInstanceKeyFound_x64" />

but this obviously isn't what I need and if I substitute the hard-code
instance with my variable "[txtDBInstance]", the registry search looks for a
value of "[txtDBInstance]" and NOT the value contained within the variable
("MY_DBINSTANCE").

I've tried using something like :

    <?define InstanceName = [txtDBInstance] ?>

and used InstanceName in the registry searches, but that too does the same
thing i.e. the InstanceName variable contains a string of "[txtDBInstance]"
and not "MY_DBINSTANCE".

So how do I pass values gained from an EditBox into the Value attribute of a
registry search ?

Cheers,

Chris.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/WiX-Boot-Strapper-Pass-value-from-EditBox-to-util-RegistrySearch-tp7596407.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to