This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: how to determine if a shell is running as Administrator?
- From: Andrew Schulman <schulman dot andrew at epa dot gov>
- To: cygwin at cygwin dot com
- Date: Thu, 05 Feb 2015 09:39:09 -0500
- Subject: Re: how to determine if a shell is running as Administrator?
- Authentication-results: sourceware.org; auth=none
- References: <slc6da9aq8g9e7h0aegafhfa86eahfd53p at 4ax dot com> <1147992409 dot 122575 dot 1423130728220 dot JavaMail dot yahoo at mail dot yahoo dot com>
>
>
> Andrew Schulman wrote:
> > What's a reliable and efficient way to determine programmatically if the shell> that's running has elevated privileges?
>
> > Or if you prefer, how can I tell if the shell was started with "Run as
> > administrator"?
>
> If you search the mailing list archive for "Change PS1 when running as administrator" there are several suggested ways.
Thanks. Consensus there is to look for group ID 544, although as the other
thread here shows, group 0 or 114 can also show it.
Andrew
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple