How to End Vbscript on Windows 10?

How to End Vbscript on Windows 10?

I accidently did a cd-drive vbs prank on myself on windows 10 and I can't find the wscript.exe file.. Is there any way to end this program?

7

5 Answers

Your script probably runs elevated so could become invisible in normal unelevated task manager. Run it elevated as well.

Another approach: open an elevated command line window. Then, taskkill /? could suggest a solution (or read taskkill: End one or more processes by process ID or image name article).

To find process ID of any running Windows scripting engine i.e either wscript.exe or cscript.exe, type

tasklist | findstr /I "PID script.exe"

and search for .vbs i.e. VBScript file extension:

wmic process where "CommandLine like '%.vbs%' and name != 'wmic.exe'" get /value

and search for your script file name (let's say cdprank.vbs):

wmic process where "CommandLine like '%cdprank%' and name != 'wmic.exe'" get /value

Best option according to me is

1) Open Task Manager

2) Go to the processes tab

3) Right-click on Name header and click command line (to show Command line)

4) Under command line look for "C:\Windows\System32\WScript.exe" "yourfilename.vbs"

5) Right-click and end task

2

Look for something called "Microsoft Windows Based Script Host" in the running processes. End this process and you should be fine.

2

Look for a process called "microsoft windows based script host" in task manager on the process tab. End task the process and your done

1

For Windows 10 TaskManager>Details search for wscript.exe Right click and select End Process tree.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.