detect Vista privilege elevator

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jul 30, 2008
2
0
#1
Hello,

I'm not sure if this is a simple to answer question or if it is a feature request or an error report:

Is there any way to detect inside a 4NT/TCC session under Vista if it was started using 'Run as Administrator'?

%_admin is always 1 on my Vista account. From my point of view that is not correct if a session was not run using 'Run as Administrator'.

Thanks
Marko
 

rconn

Administrator
Staff member
May 14, 2008
10,097
85
#2
igs wrote:

> Hello,
>
> I'm not sure if this is a simple to answer question or if it is a
> feature request or an error report:
>
> Is there any way to detect inside a 4NT/TCC session under Vista if it
> was started using 'Run as Administrator'?
>
> %_admin is always 1 on my Vista account. From my point of view that is
> not correct if a session was not run using 'Run as Administrator'.
It's a feature request.

You're looking for an internal variable that says whether the process is
elevated, not whether the user is an administrator. There isn't
currently any internal way of detecting that (it's on the suggestion
list for the next version). There are some third-party utilities that
do this.

Rex Conn
JP Software