Skip to content
⌘ NSIS Forum Archive

Add new entry to the "Add/Remove program" area

7 posts

TK1985#

Add new entry to the "Add/Remove program" area

Hi,

I want to add a new entry to the "Add or remove program" area of Windows and to the registry, but I don't know the correct commands for this actions. I tried the functions 'InstallDirRegKey' and 'WriteRegStr'. I have found an entry in the registry but nothing in the "Add/Remove program" area.
Is there anybody who can tell me the right functions to do that and give me an example to solve this problem?

greetings,

Thomas
Red Wine#
Check this related forum thread,

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
pengyou#
There is some useful information in the NSIS User Manual:

TK1985#
I've already read the NSIS user manual. The problem is, I don't realy understand the parameters of 'WriteRegStr' function. I've worked with NSIS only for 1 day now and I have to develop a setup program 🙁 .
I need an easy example.

This is the WriteRegStr command from my script:

WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\App.exe"


Please help me,

Thomas
kichik#
The following Wiki page contains a minimal example.



Examples\makensis.nsi contains a complete example and other scripts probably do as well.
fishweasel#
The most simple way i have found is to put the following in :
I have one in function .oninit and another installer where its held within the section area - both seem to work fine.

### Write uninstall path in registry for add/remove programs

WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chip&Pin" "UninstallString" "c:\myprog\Uninstall.exe"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chip&Pin" "DisplayIcon" "c:\myprog\icon1.bmp"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chip&Pin" "DisplayName" "My Program"
WriteRegDword HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chip&Pin" "NoModify" "00000001"
WriteRegDword HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chip&Pin" "NoRepair" "00000001"
The above should be pretty self explanitory - the only ones you really must have are the uninstallstring and display name.
The links previously stated will have more in depth entries -and Appendix D of the manual is very informative.
onad#
TIP:

Best to mimic MSI package intallation behaviour by adding an GUID (= Unique number) instead of using an entry like "Chip&Pin"

Use your "RegEdt32" and look at already available uninstall sections of other applications on your PC, you will learn a lot by this...