Archive: Uninstall service


Uninstall service
Hi there,

how can I uninstall my service under NT/2k/XP which I installed with the service-plugin? I searched quite a long time but cannot find the answer.

Also, it would be interesting to know if there are any examples for autostart under 9x. I didn't find this.


Cheers


Which plug-in are you talking about? Sunjammer's? It supports `delete` as a service command.

To run programs on start-up for Windows 9x you need to set a certain registry key. Something like HKLM\Software\Microsoft\Windows\CurrentVersion\Run, but I'm not sure, you should search MSDN or Google for the exact key path.


HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
or
HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

(the service program itself should also call RegisterServiceProcess when running on win9x)


I'm using this plugin: NSIS Service Library - servicelib.nsh
Version 1.0

I install my service like that:

!insertmacro SERVICE "create" "QS Server" "path=C:\Programme\Apache Group\Apache2\bin\Apache.exe;autostart=1"

And try to uninstall it like that:

!insertmacro SERVICE "delete" "QS Server" "path=C:\Programme\Apache Group\Apache2\bin\Apache.exe;autostart=1"


Then the compiler says:

Section: "Uninstall"
!insertmacro: SERVICE
Push: delete
Push: QS Server
Push: path=C:\Programme\Apache Group\Apache2\bin\Apache.exe;autostart=1
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
Error in script "D:\cstest\testing\test.nsi" on line 184 -- aborting creation process



There must be a simple solution. But I don't know where my brainerror is ... :cry:


Use this macro for the uninstaller:

!macro UNSERVICE ACTION NAME PARAM
Push '${ACTION}'
Push '${NAME}'
Push '${PARAM}'
Call un.Service
!macroend


Also contact the author, Don, and ask him to help you with the real usage or the fix if needed.