JFLarvoire / SysToolsLib

A library of Windows and Linux system management tools
Apache License 2.0
327 stars 95 forks source link

PSService in Safe Mode #30

Closed andreiv3103 closed 2 years ago

andreiv3103 commented 2 years ago

Hello

I am trying to use PSService to run a service that uninstalls a security app. The uninstall must be done in Safe Mode. The problem is that, during testing, I noticed that PsService won't start in Safe Mode. I created and registered the service in normal mode, works just fine, but after rebooting in Safe Mode, I get an error saying that this service cannot run in Safe Mode when I try to start it.

I did add the registry key to HKLM:\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal. The key is there, correctly set but the service won't start. Anything I can do to make it work? Thanks.

JFLarvoire commented 2 years ago

Sorry, I had never tried running PSService in safe mode. I don't know what's required to make it work. And I don't know if it's even feasible. If you do find a solution, please contribute it !

andreiv3103 commented 2 years ago

Don't worry, that's OK. Your tools are very useful and it is very nice of you to share them. No one expects you to test all possible use cases :) I found another project here on GitHub and it works in safe mode. So problem solved. This is the project:

https://github.com/winsw/winsw