如何从应用程序卸载Windows服务 [英] How to uninstall a Windows Service from an application

查看:79
本文介绍了如何从应用程序卸载Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个Windows服务,它已安装在系统中.
我有另一个用WPF C#开发的应用程序.
现在,我需要在此WPF应用程序内部使用button_click卸载服务.
有可能吗?

在此先感谢您的帮助... !!!

Hi,
I have a windows service,which is installed in the system.
I have another application which is developed in WPF C#.
Now i need to uninstall the service using a button_click inside this WPF application.
Is it possible?

Thanks in advance for any help...!!!

推荐答案

这很有可能...而且如此简单...点击链接...

http://suryaprakashj.blogspot.com/2008/10/install-uninstall- start-stop-windows.html [ ^ ]


http://stackoverflow.com/questions/358700/how- to-install-a-windows-service-programmatically-in-c [
it is quite possible... and so simple... follow the link...

http://suryaprakashj.blogspot.com/2008/10/install-uninstall-start-stop-windows.html[^]


http://stackoverflow.com/questions/358700/how-to-install-a-windows-service-programmatically-in-c[^]

some one has really solved this....

mark as answer if solves your problem...


尝试ServiceInstaller.Uninstall
http://msdn.microsoft.com/en-us/library/system. serviceprocess.serviceinstaller.uninstall.aspx [ ^ ]
以智能方式安装Windows服务,而不是使用Windows Installer MSI软件包 [
Try ServiceInstaller.Uninstall
http://msdn.microsoft.com/en-us/library/system.serviceprocess.serviceinstaller.uninstall.aspx[^]
Install a Windows Service in a smart way instead of using the Windows Installer MSI package[^]


这篇关于如何从应用程序卸载Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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