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.

PropertyData TypeDescription
CommanducComsThe 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.
ParametersStringDepending on the selected command, you must provide parameters like filenames, folder names…
Command NameParametersDescription
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.

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

[Settings] Path=C:\Program Files\My Application.

The Parameters property should be set to:

“C:\windows\myapp.ini” “Settings” “Path”

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: