I'm working on a VBScript to show a msgbox if a system condition is hit (it's running a loop which sleeps after each iteration).
The issue: I've noted that, when I run the script, it doesn't actually show in the TaskManager (EDIT: in the "Processes" tab) unless it has previously displayed a msgbox (after which point it shows up as "Microsoft ® Windows Based Script Host" as I'd expect).
FYI: I'm searching Task Manager by sorting by name and then looking under "Background processes".
VBScripts being hidden is problematic for a number of reasons:
- I can't easily kill the process: either during development or to change a constant value
- I can't know whether the process is running, or how many times. I was just surprised by, like, 20 msgbox's as I had ran the script many times while working on it.
- it seems generally unsafe as scripts could run without being visible.
Is this normal? Am I missing something? Is there a way to force a wscript process to always show in the Task Manager (EDIT: in the "Processes" tab)?
EDIT: @garbb pointed out that you can see all of the running VBScripts in the "Details" tab. This actually resolves most of my issues. I'm still curious, though: why does the "Processes" tab not list running VBScripts until after they have displayed their first msgbox? They are separate processes, right? This leaves space for malicious scripts to be stealthy (unless the user checks the "Details" tab).