Greetings,

Ok, I've got to ask this question even if it makes me look like a wix idiot
(I am, but keep it quiet) as I've spent way too much time trying to find the
answer on my own.

I've created a dialog (code below) that contains a PathEdit control, a
DirectoryList (and some other controls) so the user can specify a directory
path. 

Later, in the same wix script, I want to use the PathEdit's value by a
custom action.

My question is: When the dialog's OK button is pressed, can I set a property
to the PathEdit control's value? I've tried to accomplish this in the code
below, but, I'm almost certain it won't work.

Incidentally, at the end of the installation, the directory the user chose
will contain a SQL script I dynamically generate.  Thus the installation
will not install any static files or executables.

Thanks in advance for your help. 

Here's my code:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  
<Product Id="5FFFCA1A-E20B-4B76-924A-A915F3124A10" Name="WixExperiment"
Language="1033" Version="1.0.0.0" Manufacturer="None"
UpgradeCode="8E607B01-0D14-4C3E-B135-53631A6B44FF">

<Package Id="*" Keywords="UDSCU" Description="Test Script Creation Utility"
InstallerVersion="200" Compressed="yes" Languages="1033"
SummaryCodepage="1252"  />

<Media Id="1" Cabinet="CompanyXXX.cab" EmbedCab="yes" />
      
<Property Id="DefaultUIFont" Value="Tahoma_Regular" />
<Property Id="_BrowseProperty" Value="c:\Program Files\" />

<UI>
    <TextStyle Id="Tahoma_Regular" FaceName="Tahoma" Size="8" />
       
    <Dialog Id="DestinationFolderDlg" Width="325" Height="270">
      <Control Id="myPathEdit" Type="PathEdit" Width="232" Height="15" X="8"
Y="11" Property="_BrowseProperty" />

      <Control Type="PushButton" Id="OK" Text="OK" Width="56" Height="17"
X="255" Y="11">
          <Publish Property="InstallFolder"
Value="_BrowseProperty"></Publish>
          <Publish Event="EndDialog" Value="Return">1</Publish>
      </Control>

      <Control Type="PushButton" Id="Cancel" Text="Cancel" Width="56"
Height="17" X="255" Y="34">
        <Publish Event="Reset" Value="0">1</Publish>
        <Publish Event="EndDialog" Value="Return">1</Publish>
      </Control>
      <Control Id="DirectoryList" Type="DirectoryList" X="8" Y="30"
Width="233" Height="178" Property="_BrowseProperty" Sunken="yes"  
      TabSkip="no" />
      <Control Id="DirectoryCombo" Type="DirectoryCombo" X="8" Y="214"
Width="232" Height="16" Property="_BrowseProperty" Fixed="yes" 
      Remote="yes">
        <Subscribe Event="IgnoreChange" Attribute="IgnoreChange" />
      </Control>
   </Dialog>
        
   <InstallUISequence>
     <Show Dialog="DestinationFolderDlg" Before="ExecuteAction" />
    </InstallUISequence>
</UI>
</Product>
</Wix>


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to