How to find out the user account (Local System/User etc) a service is set to run under (\"Log On As\")?
Unlike this similar question this code can\'t run from within
How about using WMI and the Win32_Service class with the StartName parameter?
Win32_Service
StartName
This article might help.