Installing an Internet (URL) Shortcut
An Internet (URL) shortcut is simply a text file in INI format with a .url extension. Here is a sample URL shortcut file:
InstallMate accepts .url files for installation the same way it does other files. Therefore, if you already have the .url shortcut file on your computer, you can use normal file installation procedures to include it in your project and install it with the rest of your application. See Installing Files for more information for these procedures.
Note - InstallMate does not accept regular shortcuts (with a .lnk extension) for file installation, because they cannot be transferred by normal file copy. See Installing Shortcuts for information about installing regular shortcuts.
Some further hints and tips:
There is an oddity if you try to add a .url file with the Add Files to Project dialog box. If you select one or more .url files in this dialog, then click Open to add them to your InstallMate project, you will see the error message The above file name is invalid. This error message is produced by Windows, but appears to come from InstallMate.
This problem does not occur if you use the same Add Files to Project dialog box, but specify a *.url File filter and click Add with filter instead of Open. The Add with filter is InstallMate's internal code and works as expected.
Another way around this oddity is to use drag & drop between Windows Explorer and InstallMate: simply drag the URL shortcut files from Windows Explorer and drop them onto the desired installation folder in InstallMate.
To create the Internet shortcut on the Windows Desktop, Start menu, Programs menu, or in your application's program group, place them in the following folders on the Files and folders project page, respectively:
- Desktop (Public)
- Desktop (Public)\Start Menu
- Desktop (Public)\Start Menu\Programs
- Desktop (Public)\Start Menu\Programs\<ProductName>
Using an INI file to create an Internet shortcut
- Name - Set to URL
- Value - Set to the fully qualified URL that you are interested in; be sure to include the protocol specifier (usually http:).
- Section - Set to InternetShortcut
- INI file - Set to the fully qualified path name of the shortcut file; be sure to use a .url extension. You can use the predefined <FavoritesFolder> variable to refer to the Internet Explorer Favorites folder if necessary.
The INI file approach has the advantage that you can use symbolic variables in the specification of the Value value and INI file name; for example, you could set Value to <WebSite> or to some custom variable that you defined.
Tip - To create a URL shortcut along with the regular shortcuts in the program group of your application (on the Windows Start > Programs menu), set the INI file path to <CommonProgramGroupFolder>\My URL Shortcut.url, replacing My URL Shortcut with something appropriate to your application.
To insert <CommonProgramGroupFolder>, either type it directly or use the button to the right of the INI file field and choose Program Group Folder from the popup menu to have InstallMate insert it for you.