Sajad Karim
Sajad Karim

Reputation: 331

How to restrict user from changing the win service startup type

I need to restrict user from changing the startup type of service.

e.g. Following two windows services do not allow user to change their startup type; 1. "Group Policy Client" and 2. "Plug and Play"

Thanks.

Upvotes: 0

Views: 865

Answers (1)

Sajad Karim
Sajad Karim

Reputation: 331

Using this link and with a small change I achieved my goal. I just changed the TRUSTEE and assigned required access to them.

// Build the ACE.

BuildExplicitAccessWithName(&ea, TEXT("ADMINISTRATORS"),
    SERVICE_START | DELETE,
    SET_ACCESS, NO_INHERITANCE);

Thanks,

Upvotes: 1

Related Questions