I am new to WiX.  I have an example script working but need some help.  In
one of the dialogs (I didn't write), there is a pushbutton that gets a SQL
path. The code for the button is below.  How would I either force the button
to be pushed when entering the dialog or break up these commands into a
custom action and get it to run when entering the dialog.  I don't mind if
it runs before entering just as long as the properties are loaded once the
dialog is run.  Any help in code form would also really help.  The button
does run a custom action itself called ODBC_GetString.  I think that's the
part I'm getting stuck on.  I don't know how to make a CustomAction run
another CustomAction.  

 

 

          <Control Id="RecommendPath" Type="PushButton" X="40" Y="155"
Width="100" Height="17" Text="Recommend Path" >

            <Publish Property="ODBC_CONNECTION_STRING" Value="Driver=SQL
Server;Server=.;Trusted_Connection=yes;" Order="1">1</Publish>

            <Publish Property="ODBC_SQL_QUERY" Value="DECLARE @data_dir
varchar(500); EXECUTE master.dbo.xp_instance_regread 'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\MSSQLServer\Setup', 'SQLDataRoot', @param = @data_dir
OUTPUT; SELECT @data_dir" Order="1">1</Publish>

            <Publish Event="DoAction" Value="ODBC_GetString"
Order="3">1</Publish>

            <Publish Property="MSSQL_DATABASE_MDF_PATH"
Value="[ODBC_SQL_RESULT]\[MSSQL_DATABASE_NAME].mdf" Order="4">1</Publish>

            <Publish Property="MSSQL_DATABASE_LDF_PATH"
Value="[ODBC_SQL_RESULT]\[MSSQL_DATABASE_NAME].ldf" Order="4">1</Publish>

            <Publish Event="SpawnDialog" Value="CaErrorDlg"
Order="5"><![CDATA[CA_ERROR]]></Publish>

          </Control>

 

 

 

Best Regards,

 

Henry Sheldon

BearWare, Inc.

hshel...@bearwareinc.com

 

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to