Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create shortcut to desktop using WiX

How do I create a shortcut on the desktop from a wix setup project?

like image 273
Raymond Holmboe Avatar asked Aug 08 '12 15:08

Raymond Holmboe


People also ask

How do I create a shortcut directly to my desktop?

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.

How do I create a shortcut to advertise?

Right-click the Programs Menu folder icon, and select New Advertised Shortcut. The Browse for a Component dialog appears.

How do I create a desktop shortcut for a download?

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.


1 Answers

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> 
like image 194
Raymond Holmboe Avatar answered Sep 20 '22 19:09

Raymond Holmboe