how to determine if a shell is running as Administrator?

GrahamC grahamc001uk@yahoo.co.uk
Thu Feb 5 10:05:00 GMT 2015



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.

--
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



More information about the Cygwin mailing list