Dictionary, directory, both are in my email client's spell-check. Sorry. And yes, you should modify the File/@Id values the same way as the Component/@Id values.
If you don't change the directory paths (or if you do, it is because you really are changing directories) and you don't alter the file names or change which files are keypaths of which components, the auto-generated component guids are quite stable (we never had any problems with any of the auto-generated guids we ever employed). In fact, autogenerating your component guids is a best-practice (as long as you live by the constraint of not messing with your directory tree all the time). Non-auto-generated random guids would be problematic. With regard to your earlier mention of features, you can use the Feature attribute of the Component element to hook your components into your features. You just need to make sure your fragment is already linked in so the block doesn't get left out. -----Original Message----- From: Hotmail Acc [mailto:rpat...@hotmail.com] Sent: Thursday, August 20, 2009 3:14 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] How to work with ALLUSERS I am still getting the following errors:- 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. <?foreach directory in PersonalDir1;CommonAppDir1?> <?if $(var.directory) = "CommonAppDir1"?> <?define condition = "ALLUSERS"?> <?else?> <?define condition = "NOT ALLUSERS"?> <?endif?> <Component Id="Act.Data.$(var.directory).dll3" Directory="$(var.directory)" Guid="*"> <Condition>$(var.condition)</Condition> <File Id="Act.Data.dll3" Name="Act.Data.dll3" Source="G:\cvsroot\Mercury\bin\Act.Data.dll" DiskId="1" KeyPath="yes" /> </Component> <?undef condition?> <?endforeach?> If I select random guids won't it be a problem during minor upgrades? Minor upgrade might think that the component is deleted if we generate a new guid for this component during patch build. Also, In you code below you have used $(var.dictionary). Is "dictionary" a typo? -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Thursday, August 20, 2009 2:19 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] How to work with ALLUSERS No, with the Directory attribute set you don't need the Components inside a DirectoryRef. You do need to make the Ids and guids unique, however. I suggest the guids are '*' and the ids incorporate $(var.directory) (or anything else you are willing to define that you will vary). <?foreach directory in PersonalDir1;CommonAppDir1?> <?if $(var.directory) = "CommonAppDir1"?> <?define condition = "ALLUSERS"?> <?else?> <?define condition = "NOT ALLUSERS"?> <?endif?> <Component Id="Act.Data.$(var.dictionary).dll3" Directory="$(var.directory)" Guid="*"> <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: Hotmail Acc [mailto:rpat...@hotmail.com] Sent: Thursday, August 20, 2009 2:00 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] How to work with ALLUSERS 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 ---------------------------------------------------------------------------- -- 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