That worked perfectly. Thanks very much!

<Directory  Name="SystemFolder" Id="SystemFolder">
   <Component  Permanent="yes" Id="ProgramRegUpdate" Guid="...">
     <RegistryValue Root='HKLM'
     Key="SYSTEM\CurrentControlSet\Control\Print\Providers"
     Type='integer' Action='write' Name="EventLog" Value='7' />
   </Component>
</Directory>

Best,

Joe

On Thu, Jan 14, 2010 at 05:12:21PM -0000, Pally Sandher wrote:
> Regarding the ICE38 errors, it sounds like the directory your Component
> is under is a per-user location. Try moving the Component to a
> per-machine location like SystemFolder (even though you're not writing
> any actual files or folders to the location in your Component) if it's
> not there already. If it is then make sure you're setting the ALLUSERS
> property appropriately as modifying HKLM keys will likely require a
> per-machine installation (see
> http://msdn.microsoft.com/en-us/library/aa367559(VS.85).aspx).
> 
> Good Luck.
> 
> 
> Palbinder Sandher 
> Software Deployment & IT Administrator
> T: +44 (0) 141 945 8500 
> F: +44 (0) 141 945 8501 
> 
> http://www.iesve.com 
> **Design, Simulate + Innovate with the <Virtual Environment>**
> Integrated Environmental Solutions Limited. Registered in Scotland No.
> SC151456 
> Registered Office - Helix Building, West Of Scotland Science Park,
> Glasgow G20 0SP
> Email Disclaimer
> 
> 
> -----Original Message-----
> From: Joe [mailto:w...@barillari.org] 
> Sent: 14 January 2010 16:35
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] What is the best-practice for updating an HKLM key?
> 
> 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!

------------------------------------------------------------------------------
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

Reply via email to