mtkennerly / shawl

Windows service wrapper for arbitrary commands
MIT License
448 stars 15 forks source link

Does this support virtual service account? #49

Closed netheril96 closed 2 months ago

netheril96 commented 2 months ago

nssm supports virtual service account which allows each service to run as a different and limited user, just like the best practice on Linux. Does shawl support it too? I'm considering migrating but this is a must feature for me.

mtkennerly commented 2 months ago

Yes! I actually hadn't heard of these before, but I just tested it, and they work fine. Here's an example using the shawl-child test app from this repo:

shawl.exe add --name shawl -- C:\...\shawl-child.exe
sc config shawl obj= "NT SERVICE\shawl"
sc start shawl
sc stop shawl

When I add a log for the current username, it outputs shawl, whereas by default it would output SYSTEM.