Ich habe eine einfache Wix-Installation eine ausführbare Datei und ein paar DLLs installieren. Alles funktioniert, außer dass die Desktopverknüpfung keine normale Verknüpfung zu der ausführbaren Datei in C: \ Programme ist, sondern ein seltsamer Link, der den ausführbaren Speicherort versteckt. Darüber hinaus stammt das Symbol für diese Verknüpfung aus dem Installer-Ordner anstelle des in der ausführbaren Datei selbst.WIX gebrochen Verknüpfungssymbol
Wie kann ich eine normale einfache und einfache Verknüpfung zu c: \ program files \ mycompany \ meinproduct.exe, anstelle von dieser fancy Verknüpfung erstellen?
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="MyProduct" Language="1033" Version="1.0.0.0" Manufacturer="MyCompany" UpgradeCode="11111111-1111-1111-1111-111111111111">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Feature Id="ProductFeature" Title="MyCompany.Desktop.Setup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id='ProgramMenuDir' />
</Feature>
<Icon Id="MyProduct.ico" SourceFile="MyProduct.ico" />
<UI>
<UIRef Id="WixUI_Minimal" />
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Open MyProduct now" />
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Success! MyProduct is now installed." />
<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" Property="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Oops! Unfortunately, the installer ran into a problem and MyProduct was not installed."/>
<InstallUISequence>
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" After="FindRelatedProducts">Installed</Custom>
</InstallUISequence>
<Property Id="WixShellExecTarget" Value="[#MyProductEXE]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MyProduct">
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="MyProduct">
<Component Id="ProgramMenuDir">
<RemoveFolder Id='ProgramMenuDir' On='uninstall' />
<RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
</Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainExecutable">
<File Id='MyProductEXE' Source='$(var.MyCompany.Desktop.TargetPath)' KeyPath='yes'>
<Shortcut Id="startmenuMyProduct" Directory="ProgramMenuDir" Name="MyProduct" WorkingDirectory='INSTALLDIR' Icon="MyProduct.ico" IconIndex="0" Advertise="yes" />
<Shortcut Id="desktopMyProduct" Directory="DesktopFolder" Name="MyProduct" Description="MyProduct Description" WorkingDirectory='INSTALLDIR' Icon="MyProduct.ico" IconIndex="0" Advertise="yes" />
</File>
</Component>
<Component Id='CommonLibrary'>
<File Id='CommonDLL' Source='$(var.MyCompany.Desktop.TargetDir)\MyCompany.Common.dll' KeyPath='yes' />
</Component>
<Component Id='CSVLibrary'>
<File Id='CSVDLL' Source='$(var.MyCompany.Desktop.TargetDir)\CsvHelper.dll' KeyPath='yes' />
</Component>
<Component Id='InputLibrary'>
<File Id='WinInpDLL' Source='$(var.MyCompany.Desktop.TargetDir)\WindowsInput.dll' KeyPath='yes' />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<Component Id="DesktopShortcut" Directory="APPLICATIONFOLDER" Guid="*">
<RegistryValue Id="RegShortcutDesktop" Root="HKCU"
Key="Software\[Manufacturer]\[ProductName]" Name="DesktopSC" Value="1"
Type="integer" KeyPath="yes" />
<Shortcut Id="desktopSC" Target="[APPLICATIONFOLDER]MyCompany.Desktop.exe"
Directory="DesktopFolder" Name="MyProduct"
Icon="MyProduct.ico" IconIndex="0"
WorkingDirectory="APPLICATIONFOLDER" Advertise="no"/>
</Component>
</Fragment>
</Wix>