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

FeatReq: Add Extra Parameters to Services PeanutButter.WindowsServiceManagement #101

Open
Biztactix-Ryan opened this issue Dec 31, 2023 · 3 comments

Comments

@Biztactix-Ryan
Copy link

I'm currently managing our Installer App with WMI calls to install and repair our app,
I was looking to your package to replace WMI as System.Management isn't AOT compatible.

Unfortunately, You only expose the basic features for the service, I am looking for the

  • Startup User/Pass
  • DesktopInteraction
  • ErrorControl

It's not urgent for my problem at the moment, If you could expose those, that would be awesome.
Otherwise when it gets more urgent, I might look if I can add the features.

@BondarencoM
Copy link

I need to set recovery actions. As it stands I cannot use this library.

@fluffynuts
Copy link
Owner

@Biztactix-Ryan I'll probably need some help if you're looking for that functionality, primarily because:
a) I use sc.exe for service control (which is why the library is technically not for windows only, though, ofc, it won't work anywhere else) and sc query or sc queryex don't expose any of this information
b) looking in the registry, I don't find all this information there - eg I find that w3svc has no ErrorControl, but w3logsvc does, and I'm not sure what the flag means (1), so I'd have to go figure that out too - as well as what to do when the key is missing (eg for ErrorControl, I think that I should return 0?). I don't see user credentials in the registry (and I wouldn't expect to, tbh). I'm also not sure where DesktopIntegration state is stored - I didn't see it in the registry after enabling it on a service of mine.

@BondarencoM I have some code which does the job in another project - I'll integrate it when I get a moment.

@Biztactix-Ryan
Copy link
Author

@fluffynuts I actually went down the Direct API Route myself
But have recently found https://github.com/dahall/Vanara which has Memory Safe versions of pretty much all windows APIs...
So I've recently started using them, but haven't rewritten my original stuff to this.
It'd be worth checking out as it'll likely open up some options for you.

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

3 participants