I notice a strange behavior with browse dialog box and I'm wondering if there 
is any way around the issue.

I have the following WiX script to setup the dialog box:

            <Dialog Id="BrowseTargetDlg" Width="370" Height="270" 
Title="!(loc.BrowseDlg_Title)">
                <Control Id="PathEdit" Type="PathEdit" X="25" Y="202" 
Width="320" Height="18" Property="_BrowseProperty" Indirect="yes" />
                <Control Id="OK" Type="PushButton" X="240" Y="243" Width="56" 
Height="17" Default="yes" Text="!(loc.WixUIOK)">
                  <Publish Event="DoAction" Value="ValidateTargetPath"  
Order="1">1</Publish>
                  <Publish Event="SpawnDialog"  Value="InstallPathInvalidDlg"  
Order="2">NOT TARGET_PATH_VALID=0</Publish>
                  <Publish Event="Reset" Value="0" Order="3">NOT 
TARGET_PATH_VALID=0</Publish>
                  <Publish Event="SetTargetPath" Value="[_BrowseProperty]" 
Order="4">1</Publish>
                  <Publish Event="EndDialog" Value="Return" 
Order="5">TARGET_PATH_VALID=0</Publish>
                </Control>
                ...
                <Control Id="DirectoryCombo" Type="DirectoryCombo" X="94" 
Y="55" Width="196" Height="80" Property="_BrowseProperty" Indirect="yes" 
Fixed="yes" Remote="yes">
                    <Subscribe Event="IgnoreChange" Attribute="IgnoreChange" />
                </Control>
                ...
                <Control Id="DirectoryList" Type="DirectoryList" X="25" Y="83" 
Width="320" Height="98" Property="_BrowseProperty" Sunken="yes" Indirect="yes" 
TabSkip="no" />
                ...
            </Dialog>

What I notice is that in the PathEdit control, if I enter this folder 
"C:\Users\<user>\My Documents", I would immediately get an error dialog box for 
Error1806 (insufficient privileges to read this folder.)  And none of the 
publish events are executed.  I also get this error dialog box twice (is this 
because of the DirectoryCombo and DirectoryList controls?)  Strangely enough, 
if I hit the OK button again, the publish events are now being executed.

Anyone seen this before?  Is there any way to get around this behavior and have 
the OK button run my events instead of the default behavior?


John Leung
Software Engineer


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to