I'm working on a C# application. I've an installer Wix and I want to create shortcuts for my application. After some researches I found a the code to create shortcuts for desktop and start menu.
There is my code :
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.compagny)"/>
</Directory>
<Directory Id="DesktopFolder" SourceName="Desktop"/>
</Directory>
<!-- Shortcuts -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="*">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="$(var.product)"
Description="$(var.product) application"
Target="MyApplication.exe"
WorkingDirectory="INSTALLFOLDER"/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryKey Root="HKCU" Key="SOFTWARE\$(var.compagny)\$(var.product)">
<RegistryValue Name="installed" Type="integer" Value="1" KeyPath="yes" />
</RegistryKey>
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesk" Guid="*">
<Shortcut Id="ApplicationStartDeskShortcut"
Name="$(var.product)"
Description="$(var.product) application"
Target="MyApplication.exe"
WorkingDirectory="INSTALLFOLDER"/>
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
<RegistryKey Root="HKCU" Key="SOFTWARE\$(var.compagny)\$(var.product)">
<RegistryValue Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</RegistryKey>
</Component>
</DirectoryRef>
<Feature Id="ProductFeature" Title="$(var.product)" Level="1">
<ComponentRef Id="ApplicationShortcut"/>
<ComponentRef Id="ApplicationShortcutDesk"/>
</Feature>
After that a register is created in HKCU\SOFTWARE\MyCompagny\Product with key installed. But there is no shortcut.
What did I miss ?
Edit:
There are the log :
MSI (s) (5C:B8) [14:51:31:801]: Executing op: ActionStart(Name=CreateShortcuts,Description=Creating shortcuts,Template=Shortcut: [1])
Action 14:51:31: CreateShortcuts. Creating shortcuts
MSI (s) (5C:B8) [14:51:31:802]: Executing op: IconCreate(Icon=icone.ico,Data=BinaryData)
CreateShortcuts: Shortcut: icone.ico
MSI (s) (5C:B8) [14:51:31:808]: Executing op: SetTargetFolder(Folder=23\MyCompagny)
MSI (s) (5C:B8) [14:51:31:810]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
MSI (s) (5C:B8) [14:51:31:810]: Executing op: SetTargetFolder(Folder=25)
MSI (s) (5C:B8) [14:51:31:812]: SHELL32::SHGetFolderPath returned: C:\Users\Public\Desktop
MSI (s) (5C:B8) [14:51:31:812]: Executing op: ActionStart(Name=WriteRegistryValues,Description=Writing system registry values,Template=Key: [1], Name: [2], Value: [3])
Action 14:51:31: WriteRegistryValues. Writing system registry values
MSI (s) (5C:B8) [14:51:31:812]: Executing op: ProgressTotal(Total=2,Type=1,ByteEquivalent=13200)
MSI (s) (5C:B8) [14:51:31:813]: Executing op: RegOpenKey(Root=-2147483647,Key=SOFTWARE\MyCompagny\MyApplication,,BinaryType=0,,)
MSI (s) (5C:B8) [14:51:31:813]: Executing op: RegAddValue(Name=installed,Value=#1,)
WriteRegistryValues: Key: \SOFTWARE\MyCompagny\MyApplication, Name: installed, Value: #1
MSI (s) (5C:B8) [14:51:31:813]: Executing op: RegAddValue(Name=installed,Value=#1,)
WriteRegistryValues: Key: \SOFTWARE\MyCompagny\MyApplication, Name: installed, Value: #1