开发者

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

开发者 https://www.devze.com 2023-01-12 23:50 出处:网络
I am attempting to write a batch file that开发者_如何学Go kills the windows audio service using the following

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

精彩评论

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