I have a exe of windows form application which is put in AppData folder of each logged in user. I have written a windows service which start exe after some time interval, but issue is it doesn't start/ stop when another non- admin user logs in. The service doesn't start the exe from that users App data folder. I tried using OnSesionChange event where I stopped/started service on Log-In/Off events.I have enabled required events like

        AutoLog = true;
        CanHandlePowerEvent = true;
        CanPauseAndContinue = true;
        CanHandleSessionChangeEvent = true;
        CanShutdown = true;
        CanStop = true;

But still service status is not shown in SCM .Even the non-Admin user is not able to start or stop service manually from SCM. So how should I allow each logged in user to stop/start service. I read about SDDL but not getting how to use that.

没有正确的解决方案

其他提示

In the windows service What is the ServiceProcessInstaller's Account property set to?? Set it to LocalSystem. Set serviceinstaller's StartType to Automatic. so that it gets started whenever the OS is started irrespective of the user who has logged into

Refer this if needed http://csharp-asp.blogspot.com/2008/10/how-to-create-simple-windows-service-in.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top