installshielddacl

How to set DACL of a Windows service so that a normal user can start / stop the service


I have a Windows service application whose installer I am building using install shield. How to set the DACL of the service while installing? I know I can do a "sc sdset" after installing. But I want to set the elevated permissions as part of the install process. Is there a way to do that?


Solution

  • Just after the installation run this command as part of post installation procedure: SUBINACL /SERVICE /GRANT=S-1-5-32-545=TO

    This gives the windows service the admin privileges.