What is the correct way to find out if a process is running as the SYSTEM user. I’m looking for a win32 C API to check for the system user.
We used to check if the username was “SYSTEM”, but since Windows Server 2008 R2 the SYSTEM user appears to be localised. I.e SYSTEEM on a Dutch system.
I cant find much information about the system user via search engines as you get millions of false hits.
Thanks in advance
Neil
There is code to do this independent of localization here.
The same code would work (if modified) for any of the well-known SIDs defined here.