Archive: stop a service with nsSCM


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?

Does nsSCM tell you specifically to use /NOUNLOAD?

-Stu


Yes, it does.

http://nsis.sourceforge.net/Service_...s_on_NT/2K/XP)

/NOUNLOAD only effects, that the .dll is not deleted in the Plugins-Dir or not?


/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.


Thank you for your help. Now it works!!!