BASIC (URL Shortcut) |
This section describes the "BASIC" mode of the "ShortcutUrl" command.
This is the simplest and most compatible mechanism which will work with all browsers as it creates a simple URL based shortcut (just as "IE" or "FireFox" might create).
This mode of the "ShortcutUrl" command takes these parameters:
See the "ShortcutUrl" command for more information on this parameter.
Windows installer required an "8.3" name, if you wish to supply a specific value then preceed the title with the 8.3 name followed by a "|", if this is not done then MAKEMSI will try to create one for you. If MAKEMSI creates the 8.3 name it may generate the same name for more than one long filename so if in doubt it is best to supply it.
This value is also used to build the name of an environment variable which can be test for testing purposes and overrides the value supplied by the "URL" parameter if it exists. The name of the environment variable is ""SCURL_" followed by the title.
The default for this parameter can be set via the DEFAULT_SHORTCUT_DIR macro. The default value is "[ProgramMenuFolder]". You can supply any number of directories seperated by ";" where each directory will create a shortcut in that location.
There are some standard folder keys which you can use, see Microsoft's MSI "System Folder Properties" for more information.
If the "Icon" parameter was passed then the default is "0", else it is "".
"C" Headers will have a definition for "VK_F12" for the F12 key etc. I could not find the modifiers documented but a bit of experimentation showed that this is a bit mask with at least the following bits:
See below for an easy way of letting windows tell you what the correct value for any required key combination is. The value can be supplied as a decimal or hexadecimal value (for example "&H017B" where 01=Shift and 7B=F12 for Shift+F12).
CONFIGURATION - OPTIONS |
The following are the generic options available:
#define? DEFAULT_SHORTCUTURL_HOW BASIC ;;Default mechanism used to create URL Shortcuts #define? DEFAULT_ADD_GENERATED_RESOURCES_TO_DOCO N
The following are the options available for the "BASIC mode":
#define? SHORTCUTURL_BASIC_KEYPATH_TYPE_FOR_COMPONENTS CU=Y ;;Current User Keypath by default #define? SHORTCUTURL_BASIC_EXTRA_INI_COMMANDS ;;Any MAKEMSI commands for other valid URL keywords
An Easy Way to Determine a HotKey's Value |
Windows allows you to set a hotkey for any shortcut by right clicking on one and opening its properties. Now a IE shortcut (URL) is a text file in the form of an INI file which means that this information is stored in a text format which can be viewed with any text editor!
So to work out the hotkey create an IE shortcut, right click and select properties, now enter the shortcut, press "apply". Open a command prompt and either type the shortcut file or load in a text editor (the file will have a ".URL" file extension), the following shows the shortcut, its properties windows as well as the shortcut opened in notepad:
EXAMPLE |
#( <$ShortcutUrl Title="Google (default icon)" HOW="BASIC" Url="http://www.google.com/" Dir="DesktopFolder" > #) ;--- Basic mode is the default so no need to specify (unless default changed) --- <$Component "Google.ico" Directory_="INSTALLDIR"> ;--- Install an icon we will use for the following shortcut ------------- <$File Source=".\Google.ico" RowKey="Google.ico" KeyPath="Y"> <$/Component> #( <$ShortcutUrl Title="Google AU (better icon)" Url="http://www.google.com.au/" Dir="DesktopFolder" IconFileAt="[INSTALLDIR]Google.ico" > #)