Click here to Skip to main content
12,998,892 members (31,290 online)
Rate this:
Please Sign up or sign in to vote.
See more:
A while back I posted an article on using the service controller to stop the Microsoft Security Essentials service when you need to since they did not add that ability to the program like most AV’s do.
Since then there have been several security updates and now the program no longer works, and returns an inner exception message of Access Denied.
After some research I have narrowed down the problem to the services access control list.
The list from the file menu for the file itself is different than the list when viewed using either Process Explorer or the SC command.
What I am trying to do is find a way to Enumerate the DACL for a given service like using “sc sdshow [service name]” but only prettier in a win forms application.
I have found several examples of getting the DACL for the registry and for files but nothing for services.
Would someone please point me in the right direction?
Thank you for your time.
Posted 21-Nov-12 9:56am
ledtech3 23-Nov-12 0:30am
It is begining to look like I will have to learn how to use the API function QueryServiceObjectSecurity located here Then I can convert it to the String Format found here

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Short of Using the Windows API the best way is to use the command line utility "SC.exe" using the command
sc sdshow [ServiceName]

Then Convert it by hand using the list here on MSDN.[^]
Or create your own parser.
ledtech3 6-Jun-13 9:49am
Got it.See article Here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 3 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100