Hi,
I have a Visual Studio 2013/Add-in Express installer project that is using the 
WiXUI_Advanced dialog set, and therefore has an install scope selector (All 
users vs. only current user). My understanding is the typical registry hive for 
software settings is HKLM, whereas the current user should be HKCU. 
I've tried setting the registry root using a property containing either "HKLM" 
or "HKCU", but the RegistryKey... Root attribute will only accept certain 
strings, i.e. HKLM, HKCU, etc. When I build, it gets an error if I try to use a 
property as the value of Root. 
So, I was thinking of trying to use some sort of if...then block -- if possible 
-- to use a different RegistryKey element based on the InstallScope value at 
runtime, based on whether the user selects either all users or current user, 
but I cannot figure out how to do it. 
Note: I am not looking to create two MSIs, or two different features, but to 
perform this logic at runtime using one feature and one MSI.
This is the block at issue, where I need to vary the "Root" value. This is 
within Fragment\ComponentGroup\Component just above where I list all the files 
to install:
   <RegistryKey Root="HKCU" 
Key="Software\[Manufacturer]\[ApplicationSuiteName]\[AddinRegistryKeyName]" 
Action="createAndRemoveOnUninstall">      <RegistryValue Type="string" 
Name="Installed" Value="[APPLICATIONFOLDER]" KeyPath="yes" />   </RegistryKey>
Does anyone have any ideas on this? 
Thanks for any help,
Jeff Montgomery                                           
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to