Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopping and starting a service without admin rights #126

Open
TomWouters opened this issue May 31, 2019 · 1 comment
Open

Stopping and starting a service without admin rights #126

TomWouters opened this issue May 31, 2019 · 1 comment

Comments

@TomWouters
Copy link

Hello Peter,

I've succesfully used your windows service library in a number of applications running under net core. So thanks a lot for the nice integratable solution.

I just have one issue.

I have a service, installed as an admin user (necessary for the application).
The current logged in user is a normal user, with no option to elevate rights.
For updates, new files are downloaded, the service is stopped, files are renamed, and the service is started.

What I'm noticing is that for starting and stopping a service, installed/running under an admin account, elevated rights are necessary.

Is there a way we can call the install command, so that start and stop rights are granted to all users?

I've found a similar question/response on stack overflow, where there is an instructionset on how to do it using windows, but it would be perfect if those rights could be set using the install command.

Link:
https://stackoverflow.com/questions/10850595/windows-service-start-and-stop-without-admin-privileges

@PeterKottas
Copy link
Owner

You're welcome, glad it was useful to you.

I am afraid I don't have a clear answer for this for you though. I think it might be possible somehow but as it is not useful for me, you will either have to create a PR for this yourself or wait for somebody to work on this.

This lib was initially created to power microservices, as such it was expected to always have admin access. I am happy to support any other use cases though by merging in PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants