Skip to content
⌘ NSIS Forum Archive

variable in uninstall

2 posts

upgradeksh#

variable in uninstall

Hi guys,

I've got some trouble with Uninstall.

The installer has 4 selctions, one of them will be installed by user option.

Also, each section will be installed on different $INSTDIR, registry path of unstaller too.

The problem is this.

the $uninstall_path variable can be accessed, but not in uninstall.

===================================
Var /GLOBAL uninstall_path

Function .onInstSuccess
WriteRegStr HKLM "$uninstall_path" "UninstallString" "$INSTDIR\uninstall.exe"
FunctionEnd

Function un.onUninstSuccess
DeleteRegKey HKLM "$uninstall_path"
FunctionEnd
===================================

I tried to use register, but it wasn't sucessful.

I'd really really appreciate if someone give me advice.
Anders#
NSIS does not remember the variable data, you have to save it in the registry or a .ini if you need to use it in the uninstaller...