Skip to content
⌘ NSIS Forum Archive

Add/Remove Programs, what am i doing wrong

17 posts

statblaster#

Add/Remove Programs, what am i doing wrong

why is this not showing up in the Add/Remove programs list?


WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ABC" "ABC" "$INSTDIR\uninst.exe"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ABC" "ABC" "$INSTDIR\ABC.exe"


many thanks.
kichik#
The value name (ABC) is wrong and some values are missing. Take a look at the following page for more information about adding entries to the Add/Remove control panel:

Joost Verburg#
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ABC" \
"DisplayName" "ABC"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ABC" \
"UninstllString" "$INSTDIR\uninst.exe"
Joel#
'cuase you need this:

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT} ${MUI_VERSION}" \
"DisplayName" "App name"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT} ${MUI_VERSION}" \
"UninstallString" "uninst-app.exe"
/just for a couple of secs. 😁
statblaster#
i am sorry, i am not that great w/ this stuff.

whats {mui_product} represent? if thats my product, what would i do w/ the example I gave, w/ "ABC"?
Afrow UK#
That is for Modern UI installer
You should have
!define MUI_PRODUCT "my app name"
at the top of your nsi file.
If you aren't using Modern UI (you should be!!) then replace ${MUI_PRODUCT} with the directory representing your product.

-Stu
statblaster#
so i have,

!define MUI_PRODUCT "ABC"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${$INSTDIR\ABC.exe} ${MUI_VERSION}" \ "DisplayName" "App name"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${$INSTDIR\ABC.exe} ${MUI_VERSION}" \ "UninstallString" "uninst.exe"

please help me out...
rainwater#
Originally posted by Joost Verburg
What's wrong with my example above? Didn't it work?
"UninstllString" -> "UninstallString"
rainwater#
Originally posted by statblaster
still didnt work 🙁
What about it doesn't work. What are you using? I have done this a million times and have never known it not to work:


WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ABC" "DisplayName" "ABC 1.2.3"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ABC" "UninstallString" "$INSTDIR\uninstall.exe"
statblaster#
its just not showing up in the add/ remove directory. i have attached the code:

WriteRegStr HKLM SOFTWARE\StatBlaster "Install_Dir" "$INSTDIR"
WriteRegStr HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Run "UpdateStats" "$INSTDIR\UpdateStats.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\StatBlaster" \"DisplayName" "StatBlaster"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\StatBlaster" \"UninstallString" "$INSTDIR\uninst.exe"
kichik#
You have copied Joost's code wrongly. The line breaks are supposed to be there and the back-slashes in the end of the line tell NSIS to treat the next line as an extension to the current line. If you join the lines you have to remove those back-slashes.