How do I create a shortcut on the desktop from a wix setup project?
Click the Windows key, and then browse to the Office program for which you want to create a desktop shortcut. Right-click the program name or tile, and then select Open file location. Right-click the program name, and then click Send To > Desktop (Create shortcut). A shortcut for the program appears on your desktop.
Right-click the Programs Menu folder icon, and select New Advertised Shortcut. The Browse for a Component dialog appears.
Navigate to the file or folder on your computer. Right click the file or folder and a menu will appear. Left click the Desktop (create shortcut) item on the list. This action creates a desktop shortcut to the file or folder on your desktop.
The shortcut is a non-advertised one, hope this helps someone. Remember to put the component in your feature tag.
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="DesktopFolder" Name="Desktop"> <Component Id="ApplicationShortcutDesktop" Guid="*"> <Shortcut Id="ApplicationDesktopShortcut" Name="Text under your icon" Description="Comment field in your shortcut" Target="[MYAPPDIRPROPERTY]MyApp.exe" WorkingDirectory="MYAPPDIRPROPERTY"/> <RemoveFolder Id="DesktopFolder" On="uninstall"/> <RegistryValue Root="HKCU" Key="Software\MyCompany\MyApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </Directory> <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="MyCompany" Name="MyCompany"> <Directory Id="MYAPPDIRPROPERTY" Name="MyAppName"> <!-- main installation files --> </Directory> </Directory> </Directory> </Directory>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With