Add a generated registry value to each component and set that as the keypath.
-----Original Message----- From: Rune Moberg [mailto:jjfl...@gmail.com] Sent: 06 April 2011 13:49 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Build a directory structure using foreach? I would like to set up a directory structure under CommonAppDataFolder that looks something like this: OrderImport +- ProviderA +- Drop +- History +- Error +- ProviderB +- Drop +- History +- Error and so on... Not much more than this, but enough that I was very happy to discover the foreach statement: <?define OIProviders=ProviderA;ProviderB;ProviderZ?> <?define OIFolders=Drop;Error;History?> <Directory Id="CommonAppDataFolder"> <Directory Id="OrderImport" Name="OrderImport"> <?foreach provider in $(var.OIProviders)?> <Directory Id="$(var.provider)" Name="$(var.provider)"> <?foreach dir in $(var.OIFolders)?> <Directory Id="$(var.provider)$(var.dir)" Name="$(var.dir)"> <Component Id="$(var.provider)$(var.dir)"> <CreateFolder/> </Component> </Directory> <?endforeach?> </Directory> <?endforeach?> </Directory> </Directory> Which of course fails miserably with an error 39. "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with 0 files cannot use an automatically generated guid." I am probably approaching this all wrong. Suggestions? -- Rune ----------------------------------------------------------------------------- - Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users