Given a service name, I would like to retrieve the username that it runs under (i.e. the username shown in the \'Log On\' tab of a service\'s properties window). There doesn
You can find this using the Windows Registry, reading the following string value, replacing [SERVICE_NAME] with the name of the Windows Service:
[SERVICE_NAME]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[SERVICE_NAME]\ObjectName