Re: WMI - User - Log On As A Service

From: Daniel Pravat [MSFT] (dpravat@online.microsoft.com)
Date: 02/18/03


From: "Daniel Pravat [MSFT]" <dpravat@online.microsoft.com>
Date: Mon, 17 Feb 2003 23:34:57 -0800


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: Rerun an advertised program on Advanced client
    ... This info is not stored in WMI but in registry. ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.sms.swdist)
  • Re: WMI Leaks?
    ... This posting is provided "As Is" with no warranties, ... Subject: WMI Leaks? ... I release the allocated memory and call co-unitialize. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: IoWMIRegistrationControl returns STATUS_OBJECT_NAME_EXISTS
    ... This posting is provided "AS IS" with no warranties, ... > I am new to WMI and WDM. ... > IoWMIRegistrationControl returns STATUS_OBJECT_NAME_EXISTS. ...
    (microsoft.public.development.device.drivers)
  • Re: WMI - User - Log On As A Service
    ... TIA, ... > WMI does not expose the apis required to accomplish this. ... >> I'm using WMI to create a user account, register an application as a NT ... >> 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)