开发者

How to kill a windows service with a space in the name using taskkill within a batch file

I am attempting to write a batch file that开发者_如何学Go kills the windows audio service using the following

taskkill /F /FI "Services eq Windows Audio"

however I am unable to get taskkill to handle the space in the service name. Any ideas?

Thanks


Rather than use taskkill, why can't you use net stop:

net stop "Windows Audio"

net stop will let the service stop gracefully.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜