Granting privileges using C#..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Prasad Dabak

    #1

    Granting privileges using C#..

    Hello,

    Is it possible to programatically grant privileges like
    SeAssignPrimary TokenPrivilege to a Windows account from C# code?

    I don't want to call down to WIN32 functions

    -Prasad
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Granting privileges using C#..

    Prasad,

    Yes, it is. Basically, you will have to call the function through the
    P/Invoke layer. There isn't a managed wrapper for this kind of
    functionality in the framework.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Prasad Dabak" <pdabak@yahoo.c om> wrote in message
    news:96ca2fd2.0 311260943.38dfc fcf@posting.goo gle.com...[color=blue]
    > Hello,
    >
    > Is it possible to programatically grant privileges like
    > SeAssignPrimary TokenPrivilege to a Windows account from C# code?
    >
    > I don't want to call down to WIN32 functions
    >
    > -Prasad[/color]


    Comment

    Working...