Installing Shortcuts to External Files

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:

  1. Create the installation folders in which the external files reside on the customer's computer;
  2. Create dummy placeholders for the external files in those folders;
  3. Create shortcuts to the placeholders.

Creating shortcuts to external files

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.

  1. On the Project - Files page, create the folders as follows:

    1. Right-click on the Installation files node, then choose Insert Special Folder > Program Files Folder. This inserts the <ProgramFiles> installation folder.
    2. Right-click on the newly created <ProgramFiles> folder, then choose Insert Blank Folder. Next, change the name of the newly created folder to OtherCompany.
    3. Right-click on the OtherCompany folder, choose Insert Blank Folder again, and change its name to TheirApp.
  2. 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:

  3. To create a shortcut to the external placeholder files, right-click each placeholder file in turn and select Create Shortcut to File... from the popup menu that appears. Fill in the Create Shortcut to File dialog as appropriate; if necessary, switch to the Project - Shortcuts page to further adjust the shortcut settings.

For more information about creating shortcuts in general, see Installing Shortcuts.

Creating shortcuts to files on a CD-ROM

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.

  1. On the Project - Files page, create the folders as follows:

    1. Right-click on the Installation files node, then choose Insert Special Folder > Browse for Variable...
    2. In the Select Project Variable dialog that appears, select SetupDir to create the <SetupDir> installation folder.
    3. Right-click on the newly created <SetupDir> folder, then choose Insert Blank Folder. Next, change the name of the newly created folder to MyApp.
  2. 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:

  3. To create a shortcut to the external placeholder files, right-click each placeholder file in turn and select Create Shortcut to File... from the popup menu that appears. Fill in the Create Shortcut to File dialog as appropriate; if necessary, switch to the Project - Shortcuts page to further adjust the shortcut settings.

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.