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?
-
rebooting windows? from task manager? – Máté Juhász May 18 '16 at 15:08
-
@MátéJuhász There is no process visible in task manager – Shariq Musharaf May 18 '16 at 15:08
-
Reboot? Look for `cscript.exe` processes instead of `wscript.exe` (it's the other scripting host process). – Ƭᴇcʜιᴇ007 May 18 '16 at 15:09
-
@Ƭᴇcʜιᴇ007 There are no files like that there, any other way? – Shariq Musharaf May 18 '16 at 15:10
-
VBS needs a scripting host to run; wscript and csscript are the Windows scripting host processes that run VBS scripts. If a VBS script is running, one of those MUST be running. Where exactly are you looking for them in the Task Manager? – Ƭᴇcʜιᴇ007 May 18 '16 at 15:11
-
@Ƭᴇcʜιᴇ007 I'm looking in the background processes and there is no process like scripting or any like wscript or csscript. – Shariq Musharaf May 18 '16 at 15:13
-
1Just reboot. Unless you have set it to run at start. In which case, disable that then reboot. – EBGreen May 18 '16 at 15:17
5 Answers
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
- 211
- 2
- 4
-
2Brilliant stuff. This works like a charm on window 10. Thanks a ton for sharing. – Ajay Kumar Oct 15 '21 at 21:45
-
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
- 12,837
- 5
- 37
- 69
Look for something called "Microsoft Windows Based Script Host" in the running processes. End this process and you should be fine.
- 31
- 1
-
-
This is how I do it as well. Why was this down-voted? Much simpler than the accepted answer. You just run Task Manager, look for the above string, and click "end task". – Blisterpeanuts Nov 01 '18 at 19:09
For Windows 10 TaskManager>Details search for wscript.exe Right click and select End Process tree.
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
- 1