find out if the app is run by admin - Windows NT
This is a discussion on find out if the app is run by admin - Windows NT ; Hi all,
I have an application that I want to be run only by admin. So first
thing I have to do is to find out if the current user is admin. I know
that there is a Windows function ...
-
find out if the app is run by admin
Hi all,
I have an application that I want to be run only by admin. So first
thing I have to do is to find out if the current user is admin. I know
that there is a Windows function to find this out, but I can not
remember how is it called.
Can somebody help me please?
Thx,
Viv
-
Re: find out if the app is run by admin
Browse MSDN for GetTokenInformation and friends.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"vc" wrote in message
news:11e7a684.0401080516.384f766f@posting.google.c om...
> Hi all,
>
> I have an application that I want to be run only by admin. So first
> thing I have to do is to find out if the current user is admin. I know
> that there is a Windows function to find this out, but I can not
> remember how is it called.
>
> Can somebody help me please?
> Thx,
> Viv
-
Re: find out if the app is run by admin
If you're targetting Windows 2000 or later, try IsUserAnAdmin.
PS: A Windows-specific newsgroup, such as
comp.os.ms-windows.programmer.win32, is better than alt.os.development for
these types of questions.
--
Tim Robinson (MVP, Windows SDK)
http://www.themobius.co.uk/
"vc" wrote in message
news:11e7a684.0401080516.384f766f@posting.google.c om...
> Hi all,
>
> I have an application that I want to be run only by admin. So first
> thing I have to do is to find out if the current user is admin. I know
> that there is a Windows function to find this out, but I can not
> remember how is it called.
>
> Can somebody help me please?
> Thx,
> Viv