Skip to content
⌘ NSIS Forum Archive

stop a service with nsSCM

5 posts

hugi#

stop a service with nsSCM

Hello,

I have a problem with the nsSCM-Plugin.

I install my own service and than I start this service with following command:

nsSCM::Start /NOUNLOAD  "$dienstName" 
In the next line I´d to check the status with following command:

nsSCM::QueryStatus /NOUNLOAD  "$dienstName" 
It doesn´t work. When I does not use /NOUNLOAD in the Start-Commandline it works.

Why?

In the next section I try to stop the service. It returns error when I use the NOUNLOAD-Flag, it returns "success" when I don´t use the /NOUNLOAD-Flag but it don´t stop really.

Have anybody an idea?
hugi#
Yes, it does.



/NOUNLOAD only effects, that the .dll is not deleted in the Plugins-Dir or not?
kichik#
/NOUNLOAD makes the installer not use FreeLibrary. According to its source code, /NOUNLOAD isn't really required. It'll just save a few operations like opening and closing the service database for each call. If it works without /NOUNLOAD, you can get rid of /NOUNLOAD.