Hi Wix-users, I am curious about the best-practice way to update a registry key in HKLM. I would like to set
<RegistryValue Root='HKLM' Key="SYSTEM\CurrentControlSet\Control\Print\Providers" Type='integer' Action='write' Name="EventLog" Value='7' /> If I simply set it from a component with other (HKCU) RegistryValues and ignore the resulting warning ("warning LGHT1076 : ICE57: Component '...' has both per-user and per-machine data with an HKCU Registry KeyPath."), then Windows Installer will remove the key _entirely_ when I remove the product. Since the key is typically set to something beforehand, that's not the behavior I want. (Ideally, the key would be restored to its original value on uninstallation, but I suspect this would require copying the key to my own registry entry, then setting a custom action to call reg.exe to set the key back to the original value when the product is uninstalled.) If I pull the RegistryValue tag into its own component and mark it with Permanent="yes", then I get ICE38 errors: <Component Permanent="yes" Id="ProgramRegUpdate" Guid="..."> <RegistryValue Root='HKLM' Key="SYSTEM\CurrentControlSet\Control\Print\Providers" Type='integer' Action='write' Name="EventLog" Value='7' /> </Component> error LGHT0204 : ICE38: Component ProgramRegUpdate installs to user profile. It's KeyPath registry key must fall under HKCU. I've read on this list that one way to avoid ICE38 is to create a dummy registry key and set the keypath to that, but then (a) I'd have a permanent dummy key hanging around and (b) that defeats the purpose of the KeyPath -- I would like the _actual_ HKLM key to be checked by Windows Installer, not the dummy. I assume I'm either approaching this the wrong way or I haven't stumbled on the best-practice solution. I'm curious if anyone has any pointers. Thanks in advance! Joe ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users