|
|
|
|
#1 |
|
Junior Member
Join Date: Apr 2008
Posts: 30
|
Hello,
I know about the "un." limitation for uninstall function calls, but I wonder if there's some way to call the very same function during install and uninstall. In particular, my function checks for the existence of a service; if exists, it stops it and removes it, so that: - When installing, the updated service can be installed - When uninstalling, the service can be removed I'd like to reuse the same code portion and avoid macros (it's about thirty lines code using labels). Is there some way to do this? Thanks, Mario |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
First link on Google search if you search for your topic subject + NSIS:
http://nsis.sourceforge.net/Sharing_...nd_Uninstaller Please do a search in future. Stu |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2008
Posts: 30
|
Thank you, I already found it; but with this technique, the code is actually doubled in the installer - so double room taken.
I was looking for a smarter solution... ![]() - Mario |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Nov 2005
Posts: 115
|
You can't call a function in the installer from the uninstaller and vice versa, they are separate files.
So you have to use that macro technique to make it easier to maintain one piece of code for both or copy and paste the function adding "un." in front of the function name for the uninstaller. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Apr 2008
Posts: 30
|
Aaahhh now I get it, thanks!
I used the "double macro" approach, works great. This forum rocks ![]() - Mario |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|