Skip to content
⌘ NSIS Forum Archive

How to use the same function in install and unInstall script

3 posts

daisywheel#

How to use the same function in install and unInstall script

I want to use the same function in installation and uninstallation script (checking the admin privelegies for example).

How can I do it?
Afrow UK#
Put the code into a macro:

!macro MyFunc un
Function ${un}MyFunc
...
FunctionEnd
!macroend

!insertmacro MyFunc ""
!insertmacro MyFunc "un."
Stu