I have a simple C# application and am trying to use Wix (for the first time) to not just install the file, but to add a link to it to the All Programs folder. The msi creates all the correct directories, installs the application fine, and even adds what looks like good links to the All Programs (my company folder and a link to the application under the folder).
However, going to All Programs, expanding the link to my company's folder, and clicking on the link to the application just opens a new Windows Explorer window showing the contents of the home directory of "C:\".
What am I doing wrong? I reviewed the page at the Wix help site and other postings here (several times) and don't see what I missed.
BTW - I am using all the "bind." and "var." references in the hopes that once I get this all working, I can use this as a template for future apps without having to change many literals.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="{CE767FBA-D925-4227-887B-34B95CDE390F}" Name="Application Settings Editor" Language="1033" Version="1.0.0.0"
Manufacturer="My Company Name" UpgradeCode="{8DC42ABA-F73D-4113-9BFD-0766B4124FD1}">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine"/>
<Media Id="1" Cabinet="myapplication.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="MANUFACTURERFOLDER" Name="!(bind.property.Manufacturer)" >
<Directory Id="APPLICATIONROOTDIRECTORY" Name="!(bind.property.ProductName)"/>
</Directory>
</Directory>
<!-- Step 1: Define the directory structure -->
<Directory Id="ProgramMenuFolder">
<Directory Id="CompanyFolder" Name="!(bind.property.Manufacturer)">
<Directory Id="AppFolder" Name="!(bind.property.ProductName)"/>
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
<Component Id="$(var.Application_Settings_Editor.TargetFileName)" Guid="{8DC42ABA-F73D-4113-9BFD-0766B4124FD1}">
<File Id="$(var.Application_Settings_Editor.TargetFileName)" Source="..\Application Settings Editor\bin\Debug\Application_Settings_Editor.exe" KeyPath="yes" Checksum="yes"/>
</Component>
</DirectoryRef>
<!-- Step 2: Add the shortcut to your installer package -->
<DirectoryRef Id="AppFolder">
<Component Id="AppStartMenu" Guid="{2781BD2D-5F30-4D2A-BBAE-D2B64EB30A75}">
<Shortcut Id="AppStartMenuShortcut"
Name="!(bind.property.ProductName)"
Description="General Application Settings Editor"
Target="[INSTALLFOLDER]\[$(var.Application_Settings_Editor.TargetFileName)]"
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
<RemoveFolder Id="RemoveCompanyFolder" Directory="CompanyFolder" On="uninstall"/>
<RemoveFolder Id="RemoveAppFolder" Directory="AppFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\!(bind.property.Manufacturer)\!(bind.property.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="$(var.Application_Settings_Editor.TargetFileName)" />
<ComponentRef Id="AppStartMenu" />
</Feature>
</Product>
</Wix>
The target for your shortcut looks incorrect because you don't have a directory with an id of "INSTALLFOLDER". Try [APPLICATIONROOTDIRECTORY] instead of [INSTALLFOLDER].