aviadlich
16th May 2007 13:11 UTC
uninstall function
I have two functions that do the same one for the install and one for the uninstall
I want to unify them under the same function (save duplicate code)
how do i do it - the compiler tells me that any call to a function during the uninstall the function name must start with un. ?
demiller9
16th May 2007 14:20 UTC
I do this:
!macro DualUseFunctions_ un_
function ${un_}StartServices
# ...
functionEnd
function ${un_}SetPathVar
# ...
${${un_}WordFind} "$R0" "_" "E$0" $1
# ...
${${un_}WordAdd} "$R0" ";" "-$0" $R0
functionEnd
!macroend
!insertmacro DualUseFunctions_ ""
!insertmacro DualUseFunctions_ "un."
aviadlich
16th May 2007 14:44 UTC
Thanks