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