Hello,


I'm building an installer that installs some source code and utilities into the 
user's Visual Studio project's directory. This is obviously a per-user install.



Using a property, I'm checking the project directory:


    <Property Id="VS2010PROJECTSLOCATION">
      <RegistrySearch Id="VS2010ProjectsLocation"
                      Root="HKCU"
                      Key="SOFTWARE\Microsoft\VisualStudio\10.0"
                      Name="VisualStudioProjectsLocation"
                      Type="directory" />
    </Property>


No problem there. My directories are fine, as well:


    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="VS2010PROJECTSLOCATION" Name="Wintellect">
        <Directory Id="INSTALLDIR" Name="!(loc.InstallDir)">


Using the WiXUI_Advanced options like the following.


    <Property Id="ApplicationFolderName" Value="!(loc.InstallDir)" />
    <Property Id="WixAppFolder" Value="WixPerUserFolder" />

    <UI>
      <UIRef Id="WixUI_Advanced" />
      <UIRef Id="WixUI_ErrorProgressText" />
    </UI>


With WixUI_Advanced, clicking on the Advanced button gets me to a dialog that 
says "[ProductName] will be installed in a per-user folder and be available for 
your user account. You do not need local Administrator privileges." Kind of a 
bummer that you can't change the directory, but I figure that's because 
WiXUI_Advanced is for per machine installs not per user kind of things. Looking 
at InstallScopeDlg.wxs, it doesn't look like there's any way to get that dialog 
to work with per user installed, correct?



If the user had document 
folder<http://technet.microsoft.com/en-us/library/cc781907(WS.10).aspx> 
(http://technet.microsoft.com/en-us/library/cc781907(WS.10).aspx) redirection 
turned on, the Document's directory can be a network share. The good news is 
that WiXUI_Advanced will properly do the install to the network location.



Change the WiX UI option to WiXUI_InstallDir to the following:
    <Property Id="ApplicationFolderName" Value="!(loc.InstallDir)" />
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

    <UI>
      <UIRef Id="WixUI_InstallDir" />
      <UIRef Id="WixUI_ErrorProgressText" />
    </UI>



The UI starts up fine and the correct directory is shown in the Destination 
Folder dialog with document folder redirection is turned on. The difference 
with WiXUI_InstallDir is that clicking the Next button brings up a dialog with 
"Installation directory must be on a local hard drive."



While you can set WIXUI_DONTVALIDATEPATH like below to turn off the checking 
and achieve the same behavior as the WiXUI_Advanced, I was surprised that the 
defaults were different between the two UI modules.


<Property Id="WIXUI_DONTVALIDATEPATH" Value="1"/>



Sadly, the setting WIXUI_DONTVALIDATEPATH doesn't allow one to browse/show 
shares because the file browse dialog doesn't show network paths.



Anyway, I thought I would bring this different up to see if it was a bug or by 
design. I guess the document folder redirection came long after Windows 
Installer. :)



Thanks!



John

Wintellect

http://www.wintellect.com

877-968-5528




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to