Uninstalling Files Created by the Application
Files that are installed as part of your Tarma Installer project are automatically
removed from the customer's computer when your application is uninstalled.
However, some applications create additional files after installation that
should be removed as well. The current topic describes how to deal with these
files.
Note - You should never remove the customer's documents, i.e., the files
that your customer created and saved while working with your application
whether it be text documents, images, multi-media files, or whatever other
kind of files your application is designed to manipulate. The current topic
concerns only auxiliary files created and used by your application such as
scratch files, caches, and perhaps configuration files.
Tip - Tarma Installer automatically removes certain files that are created
by Windows on behalf of your application, for example:
- .gid, .ftg and .fts files that WinHelp creates for .hlp files;
- .oca files that Visual Basic creates for .ocx files.
You do not have to specify removal rules for these file types.
How to uninstall files created by your application
To specify files that must be removed when your application is uninstalled,
even if they were not installed by Tarma Installer, act as follows.
- Select the Files and
Folders project page in the navigation panel on the left.
- Decide in which folders your application creates the files that must
be uninstalled. Do NOT use hard-coded paths such as C:\Program Files\MyApp,
but find the appropriate folder in the folders tree.
- If necessary, create the required folders by right-clicking on the parent
folder, then choosing New Folder or New Special Folder.
- Right-click on the installation folder of your choice, then choose New
File.
-
Adjust the settings of the newly created file as follows:
- Install name - Enter the name of the file that must be
removed. Do not enter a full path; only specify the file name
proper (the path is taken care of by the installation folder in
which the file resides).
- Install action - Set to Do not install.
- Remove action - Set to Remove always.
- Registration - Set as appropriate. In most cases, you should
select No self-registration because your application probably
does not register this kind of file.
- Shared file - Check or clear as appropriate. In most cases,
you should clear this option because your application probably
does not set the SharedDlls reference count for this kind
of file.
- Leave all other file
attributes as-is.
- You may have to associate the new file with a component (right-click on
the file, then select Assign to Component) if the file is associated
with a particular feature of your product.
- Repeat steps 4-6 as required for other files.
Wildcard file specification
If you need to remove a variable number of files, the names of which you do
not know in advance, you can use wildcards in the Install name specification
in step 5. For example, to remove all backup files during uninstallation,
specify *.bak. This is subject to the following restrictions:
- Install action must be set to Do not install.
- Registration must be set to No self-registration.
- Shared file must be cleared.
- No rollback must be checked.