|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):
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:
The error message that gets displayed is also an unhelpful joke...
You can use the "DISABLEADVTSHORTCUTS" property to create non-advertised shortcuts (in place of ones normally advertised).
The main disadvantages of these shortcuts are that they are not
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).