Get the disabled status of a Windows Service

后端 未结 3 1296
灰色年华
灰色年华 2021-01-22 12:45

I have written a windows service and has set its startup type to be \'Automatic\'. But after installing the service a user can change its type to \'disabled\'.

Is there

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-22 13:34

    You can't really prevent the user from disabling it, except with operating system permissions, unless you're going to be the only admin for the box, you're not going to have that kind of control.

    You can use a 3rd-party monitoring tool such as Nagios to monitor services across all your servers, and alert you when they stop running. This has other benefits as it also allows you to monitor many other things, such as MSMQ queue lengths, disk space and memory usage (in fact anything in the performance counters).

提交回复
热议问题