Need some help to debug this:- Question :----Do I have to put the "foreach" block into some directoryRef? If so how do I do it(since directory ref could be CommonAppDir1 or PersonalDir1). Also, this foreach section is not added into <Feature></Feature> block. I got the following errors when compiled.
Error:- G:\WiX3\ACT Network Sync\ACT Network Sync\Product.wxs(155,0): error LGHT0091: Duplicate symbol 'Component:Act.Data.dll3' found. G:\WiX3\ACT Network Sync\ACT Network Sync\Product.wxs(155,0): error LGHT0092: Location of symbol related to previous error. G:\WiX3\ACT Network Sync\ACT Network Sync\Product.wxs(157,0): error LGHT0091: Duplicate symbol 'File:Act.Data.dll3' found. G:\WiX3\ACT Network Sync\ACT Network Sync\Product.wxs(157,0): error LGHT0092: Location of symbol related to previous error. File :- Product.wxs ..... ..... <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="NewDirectory1" Name="ACT"> <Directory Id="NewDirectory2" Name="ACT for Windows"> <Directory Id="INSTALLDIR" Name="ACT Network Sync"> </Directory> </Directory> </Directory> </Directory> <Directory Id="DesktopFolder" Name="DesktopFolder"/> <Directory Id="StartMenuFolder" Name="StartMenuFolder"/> <Directory Id="ProgramMenuFolder" Name="ProgramMenuFolder"> <Directory Id="ApplicationProgramsFolder" Name="ACT! Network Sync"/> <Directory Id="CommonAppDataFolder"> <Directory Id="CommonAppDir1" Name="ACT"/> </Directory> <Directory Id="PersonalFolder"> <Directory Id="PersonalDir1" Name="ACT"/> </Directory> </Directory> </Directory> ..... <DirectoryRef Id="INSTALLDIR"> ..... </DirectoryRef> ..... ..... <?foreach directory in PersonalDir1;CommonAppDir1?> <?if $(var.directory) = "CommonAppDir1"?> <?define condition = "ALLUSERS"?> <?else?> <?define condition = "NOT ALLUSERS"?> <?endif?> <Component Id="Act.Data.dll3" Directory="$(var.directory)" Guid="{xxxxxxxxxxxx}"> <Condition>$(var.condition)</Condition> <File Id="Act.Data.dll3" Name="Act.Data.dll" Source="G:\xxx\Act.Data.dll" DiskId="1" KeyPath="yes" /> </Component> <?undef condition?> <?endforeach?> ..... ..... -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Thursday, August 20, 2009 10:23 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] How to work with ALLUSERS The most reliable way would be to duplicate the components installing the files and condition them (one set uses "ALLUSERS" and the other set uses "NOT ALLUSERS"). You may be able to use the preprocessor's foreach to avoid duplicating the source code (note, I have not tested this): <DirectoryRef Id="INSTALLDIR"> <Directory Id="CommonAppDataFolder"/> <Directory Id="PersonalFolder"/> </DirectoryRef> <?foreach directory in PersonalFolder;CommonAppDataFolder?> <?if $(var.directory) = "CommonAppDataFolder"?> <?define condition = "ALLUSERS"?> <?else?> <?define condition = "NOT ALLUSERS"?> <?endif?> <Component Id=... Directory="$(var.directory)"> <Condition>$(var.condition)</Condition> <File .../> ... </Component> ... <?undef condition?> <?endforeach?> -----Original Message----- From: Hotmail Acc [mailto:rpat...@hotmail.com] Sent: Thursday, August 20, 2009 8:56 AM To: 'General discussion for Windows Installer XML toolset.' Subject: [WiX-users] How to work with ALLUSERS I need a sample wxs file which can install files to different location based on the value of ALLUSERS. Example:- allusers=1, some selected files will be installed to commonappdata folder(C:\Documents and Settings\All Users\Application Data). allusers={}, the above files will be installed to personal folder (C:\Documents and Settings\Administrator\My Documents). I have created a dialog where user can select the value for ALLUSERS. My next goal is to copy some files to different locations based on the ALLUSERS value. Thanks, Ravi ---------------------------------------------------------------------------- -- 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 ---------------------------------------------------------------------------- -- 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 ------------------------------------------------------------------------------ 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