Alberto,
First, you will have to get the current windows user identity. You can
do this by calling the static GetCurrent method on the WindowsIdentity
class. Then, pass that WindowsIdentity instance to the constructor of a
WindowsPrincipal class. With that, you can call the IsInRole method and
pass the Administrators role (a string), or you can pass in the
Administrator value from the WindowsBuiltInRole enumeration.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Alberto" <al*****@nospam.es> wrote in message
news:eX**************@TK2MSFTNGP12.phx.gbl...
How can I find out if the current user is the administrator of the os?
Thank you