In most cases, shortcuts that you create with Tarma Installer are linked to files that are installed as part of your application. Installing Shortcuts describes how to create this type of shortcuts.
However, occasionally you might want to create shortcuts to other files, for example files on the customer's system that are not explicitly installed by Tarma Installer. The current topic describes how to handle these cases. We will discuss two specific (and common) examples, but the general approach is the same in all cases:
In this scenario, we assume that you want to create one or more shortcuts to files that are not explicitly installed by Tarma Installer. For example, you might want to create a shortcut to standard Windows tools such as Notepad or Calculator, or to files that are installed by some other means (possibly as external action; see Installing Third-Party Software for details).
For concreteness, we will assume that the external file to which the shortcut should point is called External.exe and is located underneath the customer's Program Files folder, in the OtherCompany\TheirApp folder. In the steps below, you should adjust the various names as appropriate for your own situation.
On the Project - Files page, create the folders as follows:
Add placeholders for the external files by right-clicking on the appropriate folder, then choosing Insert Blank File. Adjust the settings of the newly created file as follows:
For more information about creating shortcuts in general, see Installing Shortcuts.
An alternative scenario is when your application is distributed on a CD-ROM (or DVD) and you want to run some or all programs from the CD-ROM instead of copying them to the customer's computer. For convenience, you want to use Tarma Installer to create shortcuts to the various CD-ROM files.
To do this, you must create a Tarma Installer project if you haven't done so already, and ultimately build a small Setup package that is included on your CD-ROM. The best location for this Setup package is in the same folder as your program on CD-ROM, or in a parent folder thereof (for example, the CD-ROM's root folder). This makes it easier to specify the path to the program when used as a shortcut target.
The procedure for this scenario is essentially the same as creating shortcuts to external files in general. The only thing that differs is the location of the target files, which is on the CD-ROM instead of the customer's hard disk. This can be solved by using the <SetupDir> project variable as the installation folder.
In our example, we will assume that the layout of your CD-ROM is as follows:
Proceed as follows.
On the Project - Files page, create the folders as follows:
Add placeholders for the external files by right-clicking on the MyApp folder, then choosing Insert Blank File. Adjust the settings of the newly created file as follows:
Obviously, the CD-ROM has to be in place after installation of the shortcuts for this scheme to work. The warnings that you will see during the project build refer to this situation; ignore them if you are comfortable with the situation.
Be sure to include the Setup package containing the shortcut installations on your CD-ROM.