No keypath in your component? You are likely to have a hard time with upgrades and servicing if you don't come up with a way to make your generated guids consistent from build-to-build for the same inputs.
I would recommend you make a series of RegistryValues (one for each "component") and use them as your keypaths. If they are all "buried" in the same key it won't look so "heavy" in RegEdit. -----Original Message----- From: Maillet, Ed [mailto:email...@unum.com] Sent: Monday, August 31, 2009 8:53 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Preprocessor and Component Guids Hey all, I hope I'm missing something obvious. Is there a way for the preprocessor to generate a guid value for a variable? (without making my own custom extension). Something like <?define guid = $(Guid.NewGuid) ?> I'm trying to create multiple conditional components like: <?define environments=DEVELOPMENT;PRODUCTION;STRESS?> <?foreach env in $(var.environments)?> <!-- Environment specific Component --> <Component Id="MyWebSite_$(var.env)" Guid="My_AUTO_GUID"> <!-- Rest of the component details here --> <Condition> <![CDATA[%ENVIRONMENT = "$(var.env)"]]> </Condition> </Component> <?endforeach?> I can't use Guid="*" since I also don't have a KeyPath in components. (I can make it work with KeyPath but how could I do it without?) ----- Ed ---------------------------------------------------------------------------- -- 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