[wix-users] Per-Machine Shortcuts{

Steven Packer stevenp at fps-gold.com
Thu Oct 29 10:54:02 PDT 2015


Hi all,

I have a component with a file and two shortcuts and some registry entries.
The Installscope is set to perMachine.  The shortcut to the DeskTopFolder
keeps giving me an error:

 

ICE43: Component Contact_Manager.exe has non-advertised shortcuts. It should
use a registry key under HKCU as its KeyPath, not a file.

ICE57: Component 'Contact_Manager.exe' has both per-user and per-machine
data with a per-machine KeyPath.

 

According to what I have read when installscope is set to perMachine it sets
the ALLUSERS property to 1 and when the ALLUSERS property is set to 1 the
DeskTopFolder property will point to the All Users Desktop folder.

But I still get these errors when I build the VS WiX project.

 

This is pieces of the code:

    <Package InstallerVersion="500" Compressed="yes"
InstallScope="perMachine" />

 

      <Directory Id="DesktopFolder" Name="Desktop" />

 

      <Component Id="Contact_Manager.exe"
Guid="{5A5B58BC-EF63-4CBE-9926-28E0878BAD99}">
        <File Id="Contact_Manager.exe" Source="!(bindpath.CIMSource)\Contact
Manager.exe" KeyPath="yes"/>
        <Shortcut Id="Contact_ManagerStartMenuShortcut"
Directory="STARTMENUPROGRAMS" Advertise="no"
                  Name="Customer Information Management"
Target="[INSTALLDIR]Contact Manager.exe" 
                  WorkingDirectory="INSTALLDIR" Icon="Contact_Manager.exe"
/>
        <Shortcut Id="Contact_ManagerDeskTopShortcut"
Directory="DesktopFolder" Advertise="no" 
                  Name="Customer Information Management"
Target="[INSTALLDIR]Contact Manager.exe"
                  WorkingDirectory="INSTALLDIR" Icon="Contact_Manager.exe"
/>
        <RegistryKey Root="HKLM"
Key="Software\Microsoft\Windows\CurrentVersion\App Paths\Contact
Manager.exe"
                     ForceCreateOnInstall="yes"
ForceDeleteOnUninstall="yes">
          <RegistryValue Type="string" Value="[INSTALLDIR]Contact
Manager.exe" />
          <RegistryValue Type="string" Name="Path"
Value="[INSTALLDIR];[Plugins];[DHISHARED]" />
        </RegistryKey>
      </Component>

 

If I remove the shortcut to the DeskTopFolder then I build without errors.

If I put in a registry entry to the HKCU then it will build but with a
warning.  It seems that with things set the way they are I shouldn't need
the HKCU registry entry.

Can anyone shed some light on the situation?

 

Thanks,

Steven

 



More information about the wix-users mailing list