Douglas Watts wrote:

I use the BrowseDlg from the WiXUI library to get a data directory from the user.  I store the user’s selection in a property.  Now I need to create the directory using this property.  I have tried the following WiX code but when I run the MSI I immediately get this error “Could not access network location CommonAppDataFolder”.

How do I use properties with the Directory element?

Don't use them directly. Let MSI create them for you. You want something like this:

<Directory Id="CommonAppDataFolder"
  <Directory Id="MyCompanyDataDir"
    <Directory Id="MYAPPDATADIR"

Then during the CostFinalize action, MSI will create the public MYAPPDATADIR property. I'd put your component under that directory rather than using explicit CreateFolder/RemoveFolder; let MSI manage the directories. And you can expose that component as a feature and let the user choose the directory via the normal feature-selection dialog.


-- 
sig://boB
http://bobs.org


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to