X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:to:message-id:in-reply-to
	:references:subject:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=ra0nsWRDjhRrS+P9
	QII0vwVZtsGTf4w6HMIm0FjOp7fdz/aPR6zZOTZU7zAAGxJA3Qi8bhJEuN4fTJzS
	p9NoSKagAr6t72ryimvgXE6b+i39k5NwEt31Fsz73thIjjUd4eTPqnw6mfVHEhYr
	yPriqYynZ77nZ98LHuaiich+DA0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:to:message-id:in-reply-to
	:references:subject:mime-version:content-type
	:content-transfer-encoding; s=default; bh=JDQZPj2lviNI+0e8UoMazR
	FNPw0=; b=LyuHt74HgM/bT6vMoa7tUWBMiIMs5SJSLhxnbMK1qq9uHeyjRYOdjz
	/3nY+km3ossgQP45ZbwbNnS9enaetXNVixQ39lVjAqBHWQvc1O+SYLEfSAk4xDh3
	+xLAe6Vd/9Ytw4xd/8KpDS9j1ClwtfwowJBU1wmHN+SSZEcC5X5yU=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.9 required=5.0 tests=BAYES_50,FREEMAIL_FROM,KAM_COUK,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: nm14-vm8.bullet.mail.ir2.yahoo.com
Date: Thu, 5 Feb 2015 10:05:28 +0000 (UTC)
From: GrahamC <grahamc001uk@yahoo.co.uk>
Reply-To: GrahamC <grahamc001uk@yahoo.co.uk>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Message-ID: <1147992409.122575.1423130728220.JavaMail.yahoo@mail.yahoo.com>
In-Reply-To: <slc6da9aq8g9e7h0aegafhfa86eahfd53p@4ax.com>
References: <slc6da9aq8g9e7h0aegafhfa86eahfd53p@4ax.com>
Subject: Re: how to determine if a shell is running as Administrator?
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes



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

