The requirement of my project is to install and run my service as protected and uninstall this protected service. I have tried implementing the protected 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.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)