如何在Windows应用程序中重新启动(重新启动)系统时停止服务
问题描述:
亲爱的朋友们,
这里我想知道如何在系统重启时停止Windows服务。有任何信息请与我分享。
问候,
AnilKumar.D
Dear Friends,
Here i want to Know how can we stop the windows service when system reboot.Is there any Information please share with me.
Regards,
AnilKumar.D
答
您需要使用本机API来更改启动类型。更多详细信息http://peterkellyonline.blogspot.com/2011/04/configuring-windows-service.html [ ^ ]
BTW为什么你不把启动类型改成''手册''。它将在重新启动时停止并等待手动启动?
You need to use native APIs to change the startup type.. More details here http://peterkellyonline.blogspot.com/2011/04/configuring-windows-service.html[^]
BTW why don''t you make the startup type as ''Manual'' . It will stop on reboot and will wait till it is manually started ?
在运行类型services.msc - >按enter键 - >在显示的服务中访问您的服务并右键单击 - >属性 - > StartUpType设置为Manual。然后,当系统重新启动时,您必须手动启动服务
In Run type services.msc --> press enter -> got to your Services in the displayed services and right click --> properties --> StartUpType set as Manual. Then You have to start your services manually when ever your system reboots