http://robmensching.com/blog/posts/2007/4/27/how-to-create-an-uninstall-shortcut-and-pass-all-the
If it were me... and your install is per-machine, use HKMU and then suppress the one invalid ICE message. (http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/ICE57-with-HKMU-tt5795201.html#a5796717) But really, why is it a requirement for this RegistryKey be associated with the shortcut, which shouldn't have anything to do with a service (IE, can't they be two components). -----Original Message----- From: Shyam Kannam [mailto:shyam.kan...@hotmail.com] Sent: Tuesday, December 17, 2013 1:23 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Adding a registry key to HKLM I’m running into issues to add couple registry keys to HKLM hive. This is a requirement for the project to add the key to HKLM as they can be accessed from a local system service. HKCU is not accessible from a local system service. When I use the code below, I’m getting ICE errors. Tried different ways to avoid the error, but unable to see the key under HKLM created after installation. I think I’m missing some basic here. error LGHT0204: ICE38: Component CMPApplicationStartMenuShortcut installs to user profile. It's KeyPath registry key must fall under HKCU. error LGHT0204: ICE43: Component CMPApplicationStartMenuShortcut has non-advertised shortcuts. It's KeyPath registry key should fall under HKCU. error LGHT0204: ICE57: Component 'CMPApplicationStartMenuShortcut' has both per-user and per-machine data with a per-machine KeyPath. <!-- program menu items --> <ComponentGroup Id="PROGRAMMENUSHORTCUT" Directory="PROGRAMMENUDIR2"> <Component Id="CMPApplicationStartMenuShortcut" Guid="13269471-FC6F-40E6-B7BF-02CDB3395A11" > <Shortcut Id="UninstallDriver" Name="!(loc.Uninstall)" Description="!(loc.UninstallDescription)" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" Icon="PackageIcon" /> <RegistryValue Root="HKLM" Key="Software\Microsoft\Spectrum" Name="SpectrumPackageVersion" Type="string" Value="$(var.MSIPACKAGEVERSION)"/> <RemoveFolder Id="PROGRAMMENUDIR" On="uninstall"/> </Component> </ComponentGroup> Sent from Windows Mail ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users