Create a x86 msi package and use the following authoring <Component Id="C_UriInRegistry" Guid="*"> <RegistryKey Id="RG_RegistryKey" Root="HKLM" Action="createAndRemoveOnUninstall" Key="SOFTWARE\MyCompany" > <!-- URI --> <RegistryValue Id="RG_UriSubKey" Name="MyURI" Value="http://www.example.com" Action="append" KeyPath="yes" Type="string"/> </Component>
A x86 msi package will automatically get redirected to use 32-bit registry locations. Edwin G. Castro Software Developer - Staff Digital Channels Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com Please consider the environment before printing this e-mail > -----Original Message----- > From: Sameer Arora [mailto:arora...@gmail.com] > Sent: Tuesday, June 28, 2011 10:23 AM > To: General discussion for Windows Installer XML toolset. > Subject: [WiX-users] How to: dynamically decide registry path to write to > based on OS architecture > > Hi, > > I need a way decide the registry path to write to based on the OS > architecture the installer is installing on. > > E.g: > If OS is x64 bit > create a registry key under HKLM\SOFTWARE\WoW6432Node\MyCompany > otherwise write to > create a registry key under HKLM\SOFTWARE\MyCompany > > To achieve this, I nest a component in the a Directory element (does not > allow the component outside of Directory element): > > <Component Id="C_UriInRegistry" Guid="*" > > <RegistryKey Id="RG_RegistryKey" > Root="HKLM" > Action="createAndRemoveOnUninstall" > * Key= >>>>>at this point, how can get a path based on > OS arch: HKLM\SOFTWARE\MyCompany for x86 OR > HKLM\SOFTWARE\Wow6432Node\MyCompany for x64 <<<<<* > > > <!-- URI--> > <RegistryValue Id="RG_UriSubKey" > Name="MyURI" > Value="http://www.example.com" > Action="append" > KeyPath="yes" > Type="string"/> > </RegistryKey> > > </Component> > > > > I considered using condition element like > <Condition>VersionNT64</Condition> but wouldn't that require me to > create 2 RegistryKey elements - one each for the case where VersionNT64 is > defined and undefined. I'd like to avoid to deal with two RegistryKey entries > and have if/else clauses all over the place. > > > Appreciate any and all suggestions. > > Thanks, > Sameer > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users