Skip to content
⌘ NSIS Forum Archive

How works define for unistaller

9 posts

pozbremser#

How works define for unistaller

Hallo

installer and unistaller are created in the same file.
is it possible to do one define for both - installer and unistaller?

Thank You
Afrow UK#
If you mean !define then yes.
If you want to transfer values in variables such as $R0 you must store their values in the registry or an INI file.

Stu
pozbremser#
Thank You, Afrow UK

yes, I mean !define

my nsi-file:
!define ECN_DEINSTALL_ALL ; if defined - deinstall of all components

Section -prepareuninstall
WriteUninstaller $INSTDIR\uninstaller.exe
SectionEnd

Section Un.demo
!ifdef ECN_DEINSTALLALL
ExecWait '"msiexec" /x "$EXEDIR\$ECNPARTPATH\demo.msi" /passive '
!endif
SectionEnd

demo.msi is not called from deistaller.
pozbremser#
Yes,

but there is anothe Problem.
normally all of Un.* sections called by deistaller.
But my Un.webapp would't called.
MessageBox dosen't popup

Section Un.webapp
MessageBox MB_OK "deinstall webapp"
SectionEnd
pozbremser#
i have found a problem.
deinstaller would't refresh and i try use it.
deinstaller is refresh, if You click on install-button.
Thanks a lot!
Comm@nder21#
uninstaller and installer need to be in the same script file.

though you can split script files by using a main file that you compile and include the other files using "!include file.nsi" (or .nsh).