How to close an invisible VBS file

1.1k views Asked by At

I am trying to code a batch file that can play a song. Luckily I found a solution to that at Stack Overflow. I used SachaDee's method, which created a VBS file that would play my mp3 file nicely.

My only issue is that once the VBS file is opened, I can't seem to find a way to stop the music. I even tried deleting the file in mid-song, but the song will still continue.

EDIT: I found out that the way to solve this is by running the following command.

taskkill /IM wscript.exe /F
2

There are 2 answers

0
AudioBubble On BEST ANSWER

Just to end up the question.


taskkill /IM wscript.exe /F

This will stop wscript.exe with full force. However, a vbs can also be executed through cscript.exe.

According to this question, it seems to be ideal to use cscript for command-line, to execute VBS. Altough both works.

0
Kalolol On

With your keyboard, press Ctrl+alt+del , then click Task Manager.

In task manager, click on the section where it shows you the programs that are running.

Find the VBS icon: A little cube with branches.

Click on the icon, then on the End Task Button.