Nope, I can't get it to work. Whichever way I turn this around the
dialog is setting the selection path to the original value of the
property. The ConfigurableFeature is what tells the installer what to
select. Eventually it sets MsiSelectionTreeSelectedPath in the selection
dialog. I looked at the source of the extensions and it does look like
it's setting MsiSelectionTreeSelectedPath based on _BrowseProperty, so I
am puzzled to as why it doesn't work.

 

  <Feature Id="MyFeature" Title="Default Feature" Level="1"
Display="expand"

   ConfigurableDirectory="INSTALLDIR">

 

So in the log I have:

 

MSI (c) (5C:EC) [16:25:44:253]: PROPERTY CHANGE: Modifying
_BrowseProperty property. Its current value is 'C:\Program
Files\OldName\'. Its new value: 'C:\Program Files\NewName.

...

MSI (c) (5C:EC) [16:25:44:282]: PROPERTY CHANGE: Adding
MsiSelectionTreeSelectedPath property. Its value is 'C:\Program
Files\OldName\'.

 

Here's a simple dialog to enter a name if you want to play with it.

 

<?xml version="1.0" encoding="UTF-8"?>

<Include>

 <Fragment>

  <PropertyRef Id="WEBSITENAME" />

  <UI>

   <Dialog Id="WebsiteNameDlg" Width="370" Height="270"
Title="!(loc.WebsiteNameDlg_Title)">

    <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)" />

    <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Text="!(loc.WixUIBack)" />

    <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="!(loc.WixUICancel)">

     <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>

    </Control>

    <Control Id="Description" Type="Text" X="25" Y="23" Width="280"
Height="15" Transparent="yes" NoPrefix="yes"
Text="!(loc.WebsiteNameDlgDescription)" />

    <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15"
Transparent="yes" NoPrefix="yes" Text="!(loc.WebsiteNameDlgTitle)" />

    <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370"
Height="44" TabSkip="no" Text="!(loc.WebsiteNameDlgBannerBitmap)" />

    <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370"
Height="0" />

    <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
Height="0" />

    <Control Id="NameLabel" Type="Text" X="20" Y="60" Width="290"
Height="20" Text="!(loc.WebsiteNameLabel)" />

    <Control Id="Name" Type="Edit" X="30" Y="80" Width="200" Height="18"
Property="WEBSITENAME" Text="{24}" />

   </Dialog>

  </UI>

</Fragment>

</Include>

 

Cheers

dB.

 

From: Michal Peled [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 06, 2008 12:57 PM
To: dB.; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] SetTargetPath event before CustomizeDlg

 

I'm sorry, the "_BrowseProperty" should contain the full path (i.e.
c:\program files\blablabla), so what I wrote won't do the work yet.

I would try using the [NEW_WEBSITENAME] property for the text box, and
in the "Next" button I would perform:

 

<Publish Property="_BrowseProperty"
Value="[ProgramFilesFolder]NEW_WEBSITENAME">1</Publish>

 

Anyway, using the "_BrowseProperty" seems like the correct way to go.

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michal
Peled
Sent: Sunday, January 06, 2008 7:46 PM
To: dB.; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] SetTargetPath event before CustomizeDlg

 

I'm guessing that you get the website name by a text box.

Try using "_BrowseProperty" as the property of this text box instead of
[NEW_WEBSITENAME], and remove the "SetTargetPath" event from the "Next"
button (leave only a "NewDialog" event you probably have).

Tell me if that works...

 

________________________________

From: dB. [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 06, 2008 6:43 PM
To: Michal Peled; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] SetTargetPath event before CustomizeDlg

 

I tried this before. Whatever path I put in Value I get the same
problem. (I retested yours below just to make sure). Any other ideas?

 

Thx

dB.

 

From: Michal Peled [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 06, 2008 9:51 AM
To: dB.; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] SetTargetPath event before CustomizeDlg

 

I believe that the problem lies in your "SetTargetPath" event. What
you're actually doing ,say the website name is "MyWebsite", is to set
the target path to be "MyWebsite"...

That's not what you want. What you should do is:

 

<Publish Event="SetTargetPath"
Value="[ProgramFilesFolder][NEW_WEBSITENAME]">1</Publish>

 

Hope that'll fix the error.

 

MP.

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dB.
Sent: Sunday, January 06, 2008 12:58 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] SetTargetPath event before CustomizeDlg

 

I am trying to set the target path based on previous input from the
user. In my case, I want to ask the user for a website name (eg.
MyWebsite) and set the default target path to C:\Program
Files\MyWebsite.

 

I built the dialog that asks for the website name, then I tried this,
but whatever I put in the value I get a DEBUG: Error 2872 error message:
The argument of the CheckPath control event on dialog WebsiteNameDlg is
invalid.

 

    <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)">

     <Publish Event="SetTargetPath"
Value="[NEW_WEBSITENAME]">1</Publish>

    </Control>

 

Can this be done?

 

Thx

dB.

 

-dB.

dblock.org <http://www.dblock.org/>  / foodcandy.com
<http://www.foodcandy.com/> 

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to