Skip to content
⌘ NSIS Forum Archive

servicelib.nsh

7 posts

is99#

servicelib.nsh

I'm using servicelib.nsh in order to install, remove, start and stop windows services.

Everytihng works fine, but I have a problem to remove a service during uninstall.
When I try to remove a service from uninstall I get this error:
"Call must be used with function names starting with "un." in the uninstall section."

And if I try to call to un.service I get this error:
!insertmacro: un.SERVICE
!insertmacro: macro named "un.SERVICE" not found!

Any ideas how can I fix this?

Thanks.
zuperzimo#
uninstall services - servicelib.nsh

Hi,
I've same problem, and reading doc/faq/etc I can't found any solution

!insertmacro SERVICE "delete" "${PRODUCT_SERVICE_NAME}" ""

Call must be used with function names starting with "un." in the uninstall section.
Usage: Call function_name | [:label_name]
Error in macro SERVICE on macroline 4


!insertmacro un.SERVICE "delete" "${PRODUCT_SERVICE_NAME}" ""

!insertmacro: un.SERVICE
!insertmacro: macro named "un.SERVICE" not found!

You answer was
> un.Service is not a macro, it's a function. Use Call to call it.

I used this line

Call un.SERVICE "delete" "${PRODUCT_SERVICE_NAME}" ""

Call expects 1 parameters, got 4.
Usage: Call function_name | [:label_name]


Whitch is correct call for this ?

TIA
Simone
kichik#
Just as the usage instructions show:
Push "action"
Push "name"
Push "param"
Call un.Service