Skip to content

Insert an Uninstall command

This action should be used only if you decide to include an uninstaller with the package. It allows you to add a custom action to the uninstaller log file; this command will be then executed during the uninstall process. This feature is interesting to remove additional folders like program groups and other items that are not automatically referenced. Alternatively, you can use custom actions associated to events of the uninstaller to perform additional cleaning tasks.

Property Name Data Type Description
Command ucComs The uninstall command that should be performed. There is a defined set of commands from which you you can choose in the list box. Please see below for information.
Parameters String Depending on the selected command, you must provide parameters like filenames, folder names...

Parameters should sometimes be enclosed by quotation marks, especially when paths contain spaces.

Here is the description of available uninstall commands:

Command Name Parameters Description
ucDelFile "Path to file" The Uninstaller will remove the file specified by Parameters. Example: "%DESTPATH%\My file.ext" (quotation marks mandatory)
ucDelFolder "Path to folder" Removes the folder specified by Parameters. Example: "%DESTPATH%\My Path" (quotation marks mandatory). Only empty directories are supported: see below.
ucRemoveRegKey "Full Key Path" Causes the uninstaller to remove a registry key optionally including all items. Example: "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\PBTEST1" (quotation marks mandatory)
ucRemoveRegValue "Full Key Path" "Key Name" Removes a registry entry whose name is "Key Name" and path is "Full Key Path". Example: "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\PBTEST1" "DisplayVersion" - the two parameters must be enclosed in quotation marks and separated by a space
ucRemoveSharedFile "Path to file" The Uninstaller will decrement the shared counter for the file specified by Parameters and remove it if the shared counter reaches 0. Example: "%DESTPATH%\My file.ext" (quotation marks mandatory)
ucUnregisterSelfRegFile "Path to file" Unregister a self-registered file (similar to REGSVR32.EXE -u command) specified by Parameters, but does not delete it. Example: "%DESTPATH%\shared.dll" (quotation marks mandatory)
ucRemoveFromIni "Path to .ini file" "Section Name" "Key Name" Removes the specified key from the .ini. See below for example.
ucAddComment "Comment" Add a personal comment to the uninstall log. Useful for support purposes. To insert timestamp, use the %CURDATETIME% variable. For instance: %CURDATETIME% - new version %ARCPRODVER% installed.

Important: note that ActiveX (.OCX) and DLL files which were registered using the "Self-register a file" custom action are automatically unregistered by the uninstaller if necessary. Have a look at the help topic of this "Self-register a file" custom action.

Example for ucRemoveFromIni

You want to remove from "C:\windows\myapp.ini" the following key:

Path=C:\Program Files\My Application.

The Parameters property should be set to:

"C:\windows\myapp.ini" "Settings" "Path"

Upgrading from Paquet Builder 2.9

This custom action has been completely redesigned for recent versions of Paquet Builder. Some old uninstaller commands were superseded because the uninstaller now accepts custom actions. Here is a guide to replace old commands with new actions:


Execute a program is useful for example if you would like to unregister ActiveX controls manually, launch additional cleaning utilities.

All available actions