The reply didn't get attached - but here it is again... (with one correction, it originally tried to close the DirectoryRef with a /Directory)
... Something like this? <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"/> <?if $(env._BuildArch) = "amd64" ?> <Directory Id="ProgramFiles64Folder"/> <?endif?> </Directory> <DirectoryRef Id='$(var.ProgramFolder32)'> <Directory Id="MyAppFolder" Name="My App Folder"> <Directory Id="App1" Name="App1"/> </Directory> </DirectoryRef> You need just one definition for each of your directories. The rest should be references. BTW, the <?if?>/<?endif?> around the ProgramFiles64Folder definition is optional but makes your code safer (if you reference it in your 32-bit MSI it will be set to the path TARGETDIR which is NOT what you want, and by excluding it you will instead get a build error). -----Original Message----- On Mon, 24 Aug 2009 11:20 -0700, "Blair" <os...@live.com> wrote: > See attached reply sent the same day > > -----Original Message----- > From: Arvind Aiyar [mailto:arvind.ai...@microsoft.com] > Sent: Monday, August 24, 2009 10:47 AM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] MSI with both 32-bit and 64-bit components > > Anyone ? > > -Arvind > > -----Original Message----- > From: Arvind Aiyar [mailto:arvind.ai...@microsoft.com] > Sent: Tuesday, August 18, 2009 1:35 PM > To: WiX-users@lists.sourceforge.net > Subject: [WiX-users] MSI with both 32-bit and 64-bit components > > I have to create an MSI (both x86 and x64 flavors) for my team. However, > I > have a 32-bit ONLY component that needs to go the appropriate Program > Files > directory. I used the below Wix fragment and this works fine when I > compile > a 64bit MSI, but it errors out for 32-bit with "error LGHT0091 : > Duplicate > symbol 'Directory:ProgramFilesFolder' found.". This is because the > Directory > ID is not unique but I can't figure out how to not make them conflict. > > Any ideas on how to do this cleanly ? > > Wix Fragment > > <?if $(env._BuildArch) = "x86" ?> > <?define ProgramFolder = ProgramFilesFolder ?> > <?define ProgramFolder32 = ProgramFilesFolder ?> > <?define Win64 = no ?> > <?elseif $(env._BuildArch) = "amd64" ?> > <?define ProgramFolder = ProgramFiles64Folder ?> > <?define ProgramFolder32 = ProgramFilesFolder ?> > <?define Win64 = yes ?> > <?endif?> > > <!--On 64-bit OS: ProgramFilesFolder = %Program Files (x86)% ; > ProgramFiles64Folder = %Program Files% --> > > <Directory Id='$(var.ProgramFolder32)' Name="ProgramFiles32"> > <Directory Id="MyAppFolder" Name="My App Folder"> > <Directory Id="App1" Name="App1"/> > </Directory> > </Directory> -- Curtis Jewell swords...@csjewell.fastmail.us %DCL-E-MEM-BAD, bad memory -VMS-F-PDGERS, pudding between the ears [I use PC-Alpine, which deliberately does not display colors and pictures in HTML mail] ------------------------------------------------------------------------------ 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