I managed to resolve it after some hair-pulling :)

This is what I added to the setup type dialog:

<Control Id="Next" Type="PushButton" . . .>

. . .

<!--Reset target path to default if not custom install-->

<Publish Property="_BrowseProperty"
Value="[ProgramFilesFolder]"><![CDATA[WixUI_InstallMode <>
"InstallCustom"]]></Publish>

<Publish Property="INSTALLDIR"
Value="[ProgramFilesFolder]"><![CDATA[WixUI_InstallMode <>
"InstallCustom"]]></Publish>

<Publish Event="SetTargetPath" Value="INSTALLDIR"><![CDATA[WixUI_InstallMode
<> "InstallCustom"]]></Publish>

</Control>
INSTALLDIR is the directory id of my installation folder:
<Directory Id='TARGETDIR' Name='SourceDir'>
   <Directory Id='ProgramFilesFolder' Name='PFiles'>
      <Directory Id='INSTALLDIR'>
. . .
      </Directory>
   </Directory>
</Directory>


On Wed, Dec 29, 2010 at 2:08 AM, CP YEH <ntde...@gmail.com> wrote:


> I am having the same problem as the following email describes. Just
> out of curiosity, Lisa were you able to resolve this issue? Or if
> anyone has any suggestion, please kindly let me know. Thanks in
> advance.
>
> YEH
>
>   On Tue, Mar 2, 2010 at 9:57 AM, Lisa Gracias
> <lisathelugubri...@gmail.com> wrote:
> > In my msi there are 3 types of installations listed in a radio button
> group
> > in a setup type dialog - Default, custom, and complete. If Default or
> > Complete is chosen, then the product is installed to ProgramFilesFolder.
> If
> > the user chooses Custom then in the next dialog they can choose a custom
> > location using the SelectionTree control (this is in the standard Wix
> screen
> > 'CustomizeDlg'). The problem is, if the user then goes back to the setup
> > type dialog and selects Default, the product still gets installed to the
> > custom location, instead of the default one. How do I reset the install
> > target folder?
> >
> > I've tried this to no effect:
> >
> > <Property Id='WIXUI_INSTALLDIR'>ProgramFilesFolder</Property>
> > <UI>
> > <Publish Dialog="CustomizeDlg" Control="Back" Event="SetTargetPath"
> > Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
> > </UI>
>
> >
> ------------------------------------------------------------------------------
>
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to