taskkill window spaces in its title name

前端 未结 6 1883
耶瑟儿~
耶瑟儿~ 2020-12-13 13:33

I\'m trying to run taskkill on a console window that has spaces in it\'s title. How can I pass this window title to taskkill. I have tried the following:

tas         


        
6条回答
  •  长情又很酷
    2020-12-13 14:16

    I was starting cmd shell windows using AutoIt and the tip about using tasklist really helped. I already tried the double spaces but AutoIt's Run() command created the cmd.exe shell in a manner that tasklist/taskkill could not see the window title.

    If I used a loop or AutoIt's WinKill()/WinClose() with the window title for the cmd prompt then AutoIt itself could close the window but my cmd prompt bat files only saw c:\windows\system32\cmd as the window title.

    In this case I was able to use AutoIt to kill the window instead of from a batch script.

提交回复
热议问题