0

I created this post because I couldn't comment on @PBeezy response to this question, and his answer for terminating a specific script does not work for me. He suggests doing:

wmic process where "commandline like '%%MyScript.ahk'" delete

However when I do this I get: No Instance(s) Available and the script doesn't close. I have substituted MyScript for the name of my ahk script. Any help would be greatly appreciated.

cach dies
  • 331
  • 1
  • 14

1 Answers1

1

The wildcard match provided is unlikely to match successfully, as the commandline of the process most likely does not end in MyScript.ahk

Running wmic process where "commandline like '%%MyScript.ahk%%'" delete will successfully match and stop the correct process, but it may be too greedy and stop other processes as well.

CrookedJ
  • 300
  • 1
  • 7