如何在Windows应用程序中重新启动(重新启动)系统时停止服务 [英] How can we Stop the Service when System Reboot(Restart) in windows application

查看:168
本文介绍了如何在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


这篇关于如何在Windows应用程序中重新启动(重新启动)系统时停止服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆