How can a program tell if another process is running as a service?

Posted by quietdragon on Stack Overflow See other posts from Stack Overflow or by quietdragon
Published on 2010-05-01T14:38:39Z Indexed on 2010/05/01 15:27 UTC
Read the original article Hit count: 172

I have a Win32 program which I can direct to monitor another Win32 process.

I want to find a way for the monitoring program to determine if the monitored process is running as a Win32 service.

Not all services run as SYSTEM and not all services have services.exe as a direct parent, so I don't regard these obvious techniques as being robust enough.

© Stack Overflow or respective owner

Related posts about service

Related posts about windows-service