[wix-users] Prevent installing to a directory with demo in the name

Jonathan Lloyd ninjaxor at gmail.com
Tue Sep 22 16:48:12 PDT 2015


Thanks Farrukh,

I found this guide:
http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html

in the section "Changing the UI sequence of a built-in dialog set" it shows
an approach to modifying the Next button behavior of InstallDirDlg.

I tried changing:
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog"
Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND
WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
to
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog"
Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND
(WIXUI_INSTALLDIR_VALID<>"1" OR WIXUI_INSTALLDIR="C:\DEMO\")]]></Publish>

I also tried:
WIXUI_INSTALLDIR="DEMO"

However, I was still able to install to C:\DEMO\

I would like to prohibit installing to any folder named DEMO:
C:\DEMO\
D:\DEMO\
E:\Program Files\DEMO\
etc...

Thanks again for your first reply. Do you have any more guidance? I'm not
sure how/what I should check for the contents "DEMO"



On Fri, Sep 18, 2015 at 8:30 PM, Farrukh Waheed <farrukh1 at gmail.com> wrote:
>
> You may need to write a Custom Action for this and try to execute that
with
> the Install/Next button on the dialog where user specifies the destination
> directory.
>
> For this you may have to redefine that button definition....
>
>
>
> On 19 September 2015 at 04:33, Jonathan Lloyd <ninjaxor at gmail.com> wrote:
>
> > Hi, I'm using WixUI_InstallDir and I do not want the user to be able to
> > install to any directory with the word "demo" in it.
> >
> > I've tried several approaches but really I'm completely in the dark
when it
> > come to putting together an MSI...
> >
> > appreciate any help :)
> >
> > Jon
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/


More information about the wix-users mailing list