[wix-users] Struggling with ICE38 for a per-machine MSI
Carlos Sosa
carlos.sosa.us at outlook.com
Mon Oct 31 10:00:52 PDT 2016
<Fragment>
<Component Directory="StartMenu" Id ="CMP_StartMenuShortcut"
Guid ="DEXXXXDC-8XXE-4XX4-AXX8-4CXXXX3XXDD2">
<Shortcut Id ="ApplicationShortcut"
Name ="$(var.ProductName)"
Description ="ShortCut"
Target ="[INSTALLFOLDER]test.txt"
Icon="icon.ico" />
<RemoveFolder Id="RemoveStartMenuShortcut"
On="uninstall"/>
<RegistryValue Root ="HKCU"
Key="Software\Microsoft\MyApp"
Name="Installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Fragment>
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Joseph Musser
Sent: Monday, October 31, 2016 10:45 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Struggling with ICE38 for a per-machine MSI
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>
```
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/
More information about the wix-users
mailing list