1

I have a batch that used to kill VLC.

echo
rem choice /c YN /n /d Y /t 120
taskkill /im vlc.exe

Now when it runs, VLC stays open, even though the CMD reports the taskkill command was successfully sent.

Any ideas? Perhaps a VLC (currently 2.1.5) update make it no longer work.

square_eyes
  • 1,269
  • 3
  • 22
  • 52

1 Answers1

2

Is taskkill /im vlc.exe /f or taskkill /im vlc.exe /t /f working for you? Had the same problem with explorer.exe a while ago...

Physikbuddha
  • 1,652
  • 1
  • 15
  • 30
  • `taskkill /im vlc.exe /f` worked thank you. Also, I simplified the example above. I have other lines with taskkill that still worked on those apps. Would you recommend adding the `/f` flag to them too? – square_eyes Dec 02 '14 at 21:10
  • Using the /f switch forces the program to terminate abruptly, so you'll lose any unsaved data. (This applies to local applications only, task-killing a remote program will force its termination, even without the /f switch. See http://technet.microsoft.com/en-us/library/bb491009.aspx for more information) – Physikbuddha Dec 02 '14 at 21:14
  • OK thanks for the tip. I'll just use `/f` on VLC as the others are working as is and may suffer from data loss. – square_eyes Dec 02 '14 at 21:35