Re: How to check whether ex is running under local system account?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello AJAy,

ajay.sonawane@xxxxxxxxx wrote:
Hello All
How can I check that whether my exe is running under local system
account ?
I need to check it programmatically. Can anyone shed some light on it?

-AJay



Do a GetUserName from your code while it does not impersonate someone (so maybe you do that right at the beginning of your program) and if it returns "SYSTEM", it is running under LocalSystem.

--
Stefan Kuhr

"Lesen schadet der Dummheit"
.



Relevant Pages

  • CGI connect to MS Access DB on mapped drive
    ... Is there a workaround? ... Can I make my CGI script ... impersonate the user who mapped the drive where the Access db ... local system account. ...
    (perl.dbi.users)
  • Re: Installing Services without a 1053 error
    ... I tried with and without (Interact with desktop). ... I've used INSTSRV.EXE to create services of a batch file(converted to ... Own Exe, ... Local Administrator and Local System Account. ...
    (microsoft.public.windowsxp.general)
  • Installing Services without a 1053 error
    ... I've used INSTSRV.EXE to create services of a batch file. ... Local Administrator and Local System Account. ... This sort of stuff is supposed to be ...
    (microsoft.public.windowsxp.general)
  • Re: How to use Impersonation with MAPI.
    ... - Run the service as the user you're trying to impersonate ... Using CDO and MAPI I discover whole exchange server. ... administrative privileges then everything works fine. ... start service in local system account and impersonate administrator ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Impersonating Users
    ... you have to retrieve the user token of the user you wish to impersonate, ... "Jason" wrote in message ... > With my service logged on as a Local System Account I am ...
    (microsoft.public.platformsdk.security)