首页 新闻 赞助 找找看

net stop 无法停止服务

0
悬赏园豆:10 [已关闭问题] 关闭于 2019-11-18 21:22

写了个简单的windows服务,使用管理员模式,可以启动服务,但是启动以后,不能停止服务是为什么呢?

install.bat:
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe E:\NET拾遗\windows服务\WindowsServiceTest2\WindowsServiceTest2\bin\Debug\WindowsServiceTest2.exe
Net Start MyService2
sc config MyService2 start= auto

uninstall.bat:
net stop MyService2
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe /u E:\NET拾遗\windows服务\WindowsServiceTest2\WindowsServiceTest2\bin\Debug\WindowsServiceTest2.exe

问题补充:

可以通过kill process解决的,但是有没有根本解决的方式呢

矜持先森么么哒的主页 矜持先森么么哒 | 初学一级 | 园豆:3
提问于:2019-11-18 20:54
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册