WIX Version: 2.0.4415.0 Problem Summary: How to use properties with
Directory elements Sorry for the newbie questions…but I’m
learning. 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? <?xml version='1.0'?> <Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'> <Product Id='457E3468-BA41-47bd-83A8-F6D44B282171'
Name='Test Package' Language='1033' Version='1.0.0.0' Manufacturer='Acme, Inc.'>
<Package Id='????????-????-????-????-????????????' Description='My first Windows
Installer package' Comments='This is my first attempt at creating a Windows Installer
database' Manufacturer='Acme, Inc.' InstallerVersion='200' Compressed='yes' />
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<Property Id="DATAPATH" Value="CommonAppDataFolder" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder'>
<Directory Id='INSTALLDIR' Name='TestProg' LongName='Test Program'>
<Component Id='MyComponent' Guid='427E3442-BA42-47bd-8342-F6D44B282142'>
<File Id='readme' Name='readme.txt' DiskId='1'
src='' />
<CreateFolder Directory="MyCompanyDataDir">
<Permission User="Administrators"
GenericAll="yes" />
</CreateFolder>
<RemoveFolder Id=" MyCompanyDataDirRemove"
On="uninstall" Property="MyCompanyDataDir" />
<CreateFolder Directory="MyAppDataDir">
<Permission User="Administrators"
GenericAll="yes" />
</CreateFolder>
<RemoveFolder Id=" MyAppDataDirRemove"
On="uninstall" Property="MyAppDataDir" />
</Component>
</Directory>
</Directory>
<Directory Id="DATAPATH">
<Directory Id="MyCompanyDataDir" Name="Advectis">
<Directory Id="MyAppDataDir" Name="Data"
/>
</Directory>
</Directory>
</Directory>
<Feature Id='MyFeature' Title='My 1st Feature' Level='1' ConfigurableDirectory="INSTALLDIR">
<ComponentRef Id='MyComponent' />
</Feature>
<UIRef Id="WixUI_Mondo" />
<UIRef Id="WixUI_ErrorProgressText" />
<Icon Id="Test10.exe" SourceFile="Test10.exe" /> </Product> </Wix> |
------------------------------------------------------------------------- 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