This example: http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/create_start_menu_shortcut.html
If one takes that example, and changes it a little, Allusers=1 and HKLM in registrykey for the shortcut component <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" UpgradeCode="CF252026-F1CE-4307-94C7-C7031BEB2023" Version="1.0.0.0" Language="1033" Name="My Application Name" Manufacturer="My Manufacturer Name"> <Package InstallerVersion="300" Compressed="yes"/> * <Property Id="ALLUSERS" Value="1" />* <Media Id="1" Cabinet="myapplication.cab" EmbedCab="yes" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="APPLICATIONROOTDIRECTORY" Name="My Application Name"/> </Directory> <Directory Id="ProgramMenuFolder"> <Directory Id="ApplicationProgramsFolder" Name="My Application Name"/> </Directory> </Directory> <DirectoryRef Id="APPLICATIONROOTDIRECTORY"> <Component Id="cmpmyapplication.exe" Guid="*"> <File Id="myapplication.exe" Source="MySourceFiles\MyApplication.exe" KeyPath="yes" Checksum="yes"/> </Component> <Component Id="documentation.html" Guid="*"> <File Id="documentation.html" Source="MySourceFiles\documentation.html" KeyPath="yes"/> </Component> </DirectoryRef> <DirectoryRef Id="ApplicationProgramsFolder"> <Component Id="ApplicationShortcut" Guid="*"> <Shortcut Id="ApplicationStartMenuShortcut" Name="My Application Name" Description="My Application Description" Target="[APPLICATIONROOTDIRECTORY]myapplication.exe" WorkingDirectory="APPLICATIONROOTDIRECTORY"/> <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/> <RegistryValue Root="<b>HKLM*" Key="Software\Microsoft\MyApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </DirectoryRef> <Feature Id="MainApplication" Title="Main Application" Level="1"> <ComponentRef Id="cmpmyapplication.exe" /> <ComponentRef Id="documentation.html" /> <ComponentRef Id="ApplicationShortcut" /> </Feature> </Product> </Wix> then I get these errors: error LGHT0204 : ICE38: Component ApplicationShortcut installs to user profile. It's KeyPath registry key must fall under HKCU. error LGHT0204 : ICE43: Component ApplicationShortcut has non-advertised shortcuts. It's KeyPath registry key should fall under HKCU. error LGHT0204 : ICE57: Component 'ApplicationShortcut' has both per-user and per-machine data with a per-machine KeyPath. If I change to HKMU (as described here: http://www.adivo.com/samples/xmlschema/wix-lite/t842.htm ) I get this error: error LGHT0204 : ICE57: Component 'ApplicationShortcut' has both per-user data and a keypath that can be either per-user or per-machine. Why? If I change back to HKCU, everything works fine for compile, I can install, program installs correctly, shortcuts are put in the public start menu (or public desktop for my project where I also do that), but the registrykey is put in the registryhive for the user installing the program, I want that to be for local machine, as it is documented to be that way. As far as I understand, this is required to uninstall properly?, The user who installs this software on our clients computers can be another person than the one that will be servicing and updating next time, thus, different registry hive for the other user. Btw, the orginal example does not work correctly, the Target property in the shortcut element is wrong, and the linker gives me the following warning: warning LGHT1076 : ICE69: Mismatched component reference. Entry 'ApplicationStartMenuShortcut' of the Shortcut table belongs to component 'ApplicationShortcut'. However, the formatted string in column 'Target' references file 'myapplication.exe' which belongs to component 'myapplication.exe'. Components are in the same feature. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Problem-with-registrering-shortcuts-when-using-perMachine-installations-tp7595220.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ 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