Thursday, November 8, 2012

Disable button start stop restart windows services at services.msc

Those would like to intent to disable the buttons ( Start, Stop, Pause, Resume), just locate the following line and comment it out on your services code.

ServiceStatus.dwControlsAccepted   =  SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN | SERVICE_ACCEPT_PAUSE_CONTINUE; 

But will strange thing is that after you commented out the line, it turns out that service becomes unstoppable, and also its uninstall from the Service Control Panel is deferred to next reboot.

No comments: