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
Add new entry to the "Add/Remove program" area
7 posts
There is some useful information in the NSIS User Manual:
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
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
The following Wiki page contains a minimal example.
Examples\makensis.nsi contains a complete example and other scripts probably do as well.
Examples\makensis.nsi contains a complete example and other scripts probably do as well.
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.
The links previously stated will have more in depth entries -and Appendix D of the manual is very informative.
I have one in function .oninit and another installer where its held within the section area - both seem to work fine.
The above should be pretty self explanitory - the only ones you really must have are the uninstallstring and display name.
### 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 links previously stated will have more in depth entries -and Appendix D of the manual is very informative.
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...
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...