MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Reboots[Next]: Source Availability
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer FAQ (the basics)->Shortcuts

Windows Installer Basics: Shortcuts

The MAKEMSI "Shortcut" command is the simplest way to create shortcuts (which are implemented via the "Shortcut" table).

There are two types of shortcuts supported by Windows Installer (MAKEMSI supports a third type of shortcut which is a hybrid):

  1. Advertised
    This type of shortcut advertises a feature. This allows installation on demand or repair of all or parts of your product.

    The target file is identified via a "component keypath" and this frequently causes problems since you may want to conditionally create advertised different versions of advertised shortcuts without installing the file multiple times.

    The target file is "executed" via its default action (file association - see the "Extn" command). This is a restriction which frequently forces you to use non-advertised shortcuts (against your will).

    Advertised shortcuts can workaround "features" in your msi as well as those in Windows Installer itself, for example an advertised shortcut could repair missing files caused by pending reboot operations.

    Windows doesn't display advertised shortcuts in the "SendToFolder" (possibly others also)! Sounds like a bug to me...
    There are also some disadvantages to the end user:

    You can use the "DISABLEADVTSHORTCUTS" property to create non-advertised shortcuts (in place of ones normally advertised).

  2. Non-Advertised
    These are the traditional shortcuts that has always been around. The target program is explicitely defined as are the arguments.

    The main disadvantages of these shortcuts are that they are not advertised.
    The main advantages are:

For a standalone example of how shortcuts are created with MAKEMSI have a look at the "TryMeShortcuts.MM" sample.

Issue with Microsoft's Validation Suites

The default for MAKEMSI is a per-machine install (ALLUSERS=1) so the shortcuts are created for "all users". The standard Microsoft validation suite does not understand the context and for this reason will create 2 warning messages if the "NonAdvertisedShortcut" component is created with file keypath or LM=Y (rather than CU=Y which it wants). However if you do use CU=Y then an unnecessary repair will take place for each user to create the per-user component keypath. This is one case where it is wise to ignore a validation message (be sure you understand them first though).


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Reboots[Next]: Source Availability


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday February 28 2016 at 3:45pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.