[wix-users] Struggling with ICE38 for a per-machine MSI
Joseph Musser
me at jnm2.com
Mon Oct 31 09:44:54 PDT 2016
I'm getting: "Component ApplicationShortcut installs to user profile. It
must use a registry key under HKCU as its KeyPath, not a file."
Why does the shortcut component install to user profile and how can I force
it to install per-machine?
I think the shortcut must be in its own component because I want to make
the install conditional on a checkbox. Also, the target is a file in a
fragment generated by heat so I can't nest the shortcut element inside a
file element.
All the guidance I can find says that you must use a per-user registry key,
but I *do not* want anything installed per-user. Everything must be
per-machine.
Thanks!
Code:
```
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="****" Name="****" Language="1033" Version="2.0.17.0"
Manufacturer="****" UpgradeCode="****">
<Package Description="****" InstallerVersion="200" Compressed="yes"
InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName]
is already installed." />
<MediaTemplate EmbedCab="yes" CompressionLevel="high"/>
<!--Property Id="InstallApplicationStartMenuShortcut" /-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONFOLDER" Name="****" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="****">
<Component Id="ApplicationShortcut" Guid="****">
<Condition>InstallApplicationStartMenuShortcut</Condition>
<Shortcut Id="ApplicationStartMenuShortcut"
Name="****"
Description="****"
WorkingDirectory="APPLICATIONFOLDER"
Target="[APPLICATIONFOLDER]Client.exe" />
<RemoveFolder Id="RemoveShortcut"
Directory="ApplicationProgramsFolder" On="uninstall" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="Complete" Level="1" Title="****">
<ComponentGroupRef Id="HeatGeneratedFragmentComponentGroupId" />
<ComponentRef Id="ApplicationShortcut" />
</Feature>
</Product>
</Wix>
```
More information about the wix-users
mailing list