1. Mandatory Parameters
Registry Keys
Information displayed in Add/Remove Programs are stored in registry:
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Application_Flag]
Where “My_Application_Flag” can be the product code or the name of the application
.
Mandatory Values
To create an entry in Add/Remove Programs, 3 values are mandatory:
- DisplayName: The name of the application
- InstallLocation: The install directory of the application
- UninstallString: The command allowing uninstalling the application
Those values must not be empty, but a simple dot (.) is sufficient.
.
.
2. Optional Parameters
- DisplayIcon: Path to the icon (exe or ico file)
- DisplayVersion: Version of the application
- Publisher: Manufacturer of the application
- NoRemove: When set to “1”, deactivates the “Uninstall” button
- NoRepair: When set to “1”, deactivates the “Repair” button
- NoModify: When set to “1”, deactivates the “Modify” button
- InstallDate: Application installation date (yyyymmdd)
.
.
3. Example
Create the following reg file and import it in registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Application] "DisplayName”=”My Application” “InstallLocation”=”C:\\Program Files\\ My Application” “UninstallString”=”.” “DisplayIcon”= ”C:\\Program Files\\ My Application\MyApp.exe” “DisplayVersion”=”4.5.2” “Publisher”=”DBS Corp” “NoRemove”=dword:00000001