- Get Service Privileges (On Vista OS)
- Posted by Rainer Budde on March 27th, 2007
Hi,
I want to get the privileges from a service on a vista OS. In the
command prompt you can enter:
---------------
sc qprivs w32time
---------------
and you will get a list of the privileges assigned to the service. I
would get these informations by my software with ChangeServiceConfig2,
but with this function I can´t get the assigned privileges.
With ChangeServiceConfig2 I only can get the informations about the
required privileges, but not the assigned privileges.
Can anyone give me some information which API function I have to use to
get/set the privileges by/to a service?
Kind regards
Rainer Budde
- Posted by Grzegorz Wróbel on March 27th, 2007
Rainer Budde wrote:
To get the list of privileges being held by the process use these APIs:
OpenProcessToken()
GetTokenInformation()
LookupPrivilegeName()
to set the privilege(s) that is(are) held but not set use:
AdjustTokenPrivileges()
--
Grzegorz Wróbel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D
- SNTP service from Windows XP or Windows Vista? (Microsoft Windows) by Sven Pran
- GetDisplayDevices() from Service on Vista? (Development Resources) by a.kolarik@computer.org
- ask Vista for system privileges (Development Resources) by Erick Engelke
- Problem with Exception handling mechanism in Service Applicationin Vista (Development Resources) by Fuzzy Child
- GetLastInputInfo from a service on Vista x64 (Development Resources) by cheese monkey

