[wix-users] Struggling with ICE38 for a per-machine MSI

Joseph Musser me at jnm2.com
Mon Oct 31 10:20:22 PDT 2016


It makes sense that this would be a bug, since nothing in this file should
be per-user. Should I file an issue here, or is there an existing issue for
what you're thinking of?
https://github.com/wixtoolset/issues/issues?utf8=%E2%9C%93&q=is%3Aissue%20%20ice38%20

On Mon, Oct 31, 2016 at 1:13 PM, Hoover, Jacob <Jacob.Hoover at greenheck.com>
wrote:

> I believe this semi-related to a buggy ICE that Rob once blogged about.  I
> handled it with a HKMU registry value, however I think that introduces a
> second ICE57, that I ended up suppressing.
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Carlos Sosa
> Sent: Monday, October 31, 2016 12:01 PM
> To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] Struggling with ICE38 for a per-machine MSI
>
>
> <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/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list