Share via

Uninstalling protected service.

Anonymous
2016-12-06T05:29:33+00:00

I have tried implementing the Protecting anti malware service referring the following msdn post:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn313124(v=vs.85).aspx

I have successfully installed the protected service with the help of ELAM as mentioned in the post. Now I want to uninstall this protected service. Using the same protected service while uninstalling ChangeServiceConfig2 fails with error(5) Access Denied, when I try to set SERVICE_LAUNCH_PROTECTED_INFO from SERVICE_LAUNCH_PROTECTED_ANTIMALWARE_LIGHT to SERVICE_LAUNCH_PROTECTED_NONE, the service handle provided to this function has SERVICE_ALL_ACCESS rights. To uninstall this service i need to mark it as unprotected.  We can mark this service as unprotected with help of registry by modifying "LaunchedProtected" value from 3 to 0 at registry path "HKLM\System\CurrentControlSet\Services\Test Service".

How can we mark this service as unprotected with help of ChangeServiceConfig2 ?

Windows for home | Previous Windows versions | Security and privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2016-12-06T05:43:37+00:00

    Hi,

    The support for that project is MSDN so check with the experts there.

    Windows Developer Support

    https://developer.microsoft.com/en-us/windows/support

    Rob - SpiritX

    Was this answer helpful?

    0 comments No comments