更改服务的启动类型 (Windows) [英] Changing the service's startup-type (Windows)
本文介绍了更改服务的启动类型 (Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在寻找更改 Windows 服务启动类型的方法,但我找到了 2 种方法来执行此操作...
I was searching for ways to change the start-up type of a Windows service and I found 2 ways to do this...
我想知道哪个是最好的...我希望我的应用程序在 Windows 和 Vista 上都能正常运行.
I want to know which one is the best... I want my application to run properly on both Windows and Vista.
推荐答案
您也可以直接使用 win32 API.我肯定会推荐 WMI 类;如果未来版本的 Windows 发生变化,那么您的代码很可能仍然有效.
You can also use the win32 API directly. I'd definitely recommend the WMI class; it makes it most likely that if there are changes in future versions of windows that your code still works.
这篇关于更改服务的启动类型 (Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文