Thursday, 23 June 2011

Adding Shortcut to an application using WPS

Goto Installation Expert, Select Shortcuts under Feature Details
From Current Feature, Select a Feature or condition. (Because any item to add must be assigned to a specific feature, we cannot add an item when All Features is selected.)

Click on Add
Shortcuts can be created using the files that are present in the installation or by passing command line arguments.
File in the installation
 Mark this to have the shortcut open a file in the installation.
Advertised: This is marked by default, which means this shortcut appears on the destination computer regardless of whether its target is installed or advertised. When the end user opens an advertised shortcut, installation of the target .EXE file is initiated. If you clear this checkbox, the shortcut appears only if its target is installed, but not if its target is advertised.
Note : If you designate a shortcut as advertised, and the shortcut's target is deleted, selecting that shortcut initiates self-repair. Self-repair is not initiated for non-advertised shortcuts.
Command Line
Mark this to have the shortcut execute a command line statement. Use this option to open a file that's not part of the installation, but only if you're sure the file exists on the destination computer. Command line shortcuts are not advertised.

  • Command Line: Enter the entire command line statement, including arguments and other command line options

  • Shortcut Name: Enter a name for the shortcut.

  •   The options File in the installation and Command Line are used depending on the requirement.
    Below are the steps to create shortcuts in MSI:
    1. Choose "File in the installation" or "Command line".
    2. If "Command line" option is selected enter command line and Shortcut Name.                                                                                                                 

    2. Click Next to proceed.
    3. For the shortcut that is created using "File in the installation" option, select the file from the application to create a shortcut for.


    4. Click "Next" to select the Shortcut Destination Directory.
    Select the Destination Directory for the new shortcut.
    Specify a directory to contain the shortcut. The predefined directories on this dialog represent standard system directories on the destination computer. The most common location for application shortcuts is the Start menu's Programs directory, which is selected by default.
    To put the shortcut in a new directory, click on New Folder to create it, with the option available at the bottom left of the dialog.

    To create the new directory enter the name of new directory Name at "New FolderName".


    5. Click on Finish.
    The Shortcut Details dialog appears, where you can specify further details for the shortcut.
    Below screenshot shows the difference when option "File in the installation" (Left screenshot) \ "Command Line" (Right screenshot) is selected. Here note that, the shortcut that is created using command line is not advertised.

    In order to set/edit/change the display icon for the shortcut, click on New Icon which is there at bottom left side of shortcut Details dialog.

    Click on Browse for the icon to specify the path of the icon file.

    Select an .EXE\.dll\.ico file.

    Select appropriate Icon for your shortcut.
    Click OK to close the dialog.
    You can specify further details for the shortcut if needed as per the requirements.
  • Arguments: Enter command line arguments to append to the command line statement that is executed to launch the target of this shortcut. You can enter property names surrounded by brackets to specify standard directories. (Example: To specify a file named Notes.txt in the Program Files directory, enter [ProgramFilesFolder]Notes.txt.)

  • Description: Enter a one-line description of the shortcut, which appears when an end user right-clicks on a shortcut file in Windows Explorer and selects Properties.

  • Working Directory: Select the directory that should be current when the target of this shortcut is launched.

  • Show Window : Select whether the target file opens in a normal/minimized/maximized window.



  • Click on Ok button to save the changes.

    1 comment: