Re: WMI - User - Log On As A Service

From: Ryan Schreiber (rschreiber@deloitte.co.za)
Date: 02/18/03


From: "Ryan Schreiber" <rschreiber@deloitte.co.za>
Date: Tue, 18 Feb 2003 13:59:30 +0200


I've only managed to find examples in C++. Does anyone have a C# example
that is usable.

TIA,
Ryan

"Daniel Pravat [MSFT]" <dpravat@online.microsoft.com> wrote in message
news:#vO6uAy1CHA.1424@TK2MSFTNGP12...
> WMI does not expose the apis required to accomplish this.
> You can look into P/Invoke LsaAddAccountRights.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
>
> "Ryan Schreiber" <rschreiber@deloitte.co.za> wrote in message
> news:uunfFJq0CHA.1636@TK2MSFTNGP10...
> > I'm using WMI to create a user account, register an application as a NT
> > service and set the RunAs user for this service. The user created
doesn't
> > have the "Log On As A Service" right and the service then fails to start
> > with a permission error.
> >
> > Is there any way of giving the user this permission programmatically via
> WMI
> > (or something else)?
> >
> > Thanx,
> > Ryan
> >
> >
>
>



Relevant Pages

  • Re: WMI - User - Log On As A Service
    ... WMI does not expose the apis required to accomplish this. ... This posting is provided "AS IS" with no warranties, ... > with a permission error. ...
    (microsoft.public.dotnet.security)
  • WMI - User - Log On As A Service
    ... I'm using WMI to create a user account, register an application as a NT ... service and set the RunAs user for this service. ... with a permission error. ... Is there any way of giving the user this permission programmatically via WMI ...
    (microsoft.public.dotnet.security)
  • .net framework wmi crash problem
    ... We made a windows service that expose instance of a class to WMI, ... WMI service is scrambled and finally the test service will crash. ... exception that could not be handled. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: WMI from C#
    ... managed assembles, which expose their properties to WMI. ... >>> support update or deletion of managed objects. ...
    (microsoft.public.win32.programmer.wmi)
  • EventLog
    ... load it pragmatically via WMI? ... TIA ... Prev by Date: ...
    (microsoft.public.win32.programmer.wmi)