TK1985
23rd February 2007 08:44 UTC
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
23rd February 2007 08:53 UTC
Check this related forum thread,
http://forums.winamp.com/showthread....hreadid=263454
pengyou
23rd February 2007 08:58 UTC
There is some useful information in the NSIS User Manual:
http://nsis.sourceforge.net/Docs/AppendixD.html#D.2
TK1985
23rd February 2007 09:51 UTC
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
23rd February 2007 12:02 UTC
The following Wiki page contains a minimal example.
http://nsis.sourceforge.net/Add_unin...emove_Programs
Examples\makensis.nsi contains a complete example and other scripts probably do as well.
fishweasel
23rd February 2007 12:51 UTC
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
23rd February 2007 13:59 UTC
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...