Discussion:
Stopping background script
(too old to reply)
Dave "Crash" Dummy
2018-05-25 19:25:46 UTC
Permalink
I have a small VBS script that starts at startup and then runs
continuously in the background. How can I locate and stop the script?
I've done it before, but that was long before Windows 10 and the onset
of senility. I know there is a list of running applications somewhere...
--
Crash

Genius is the ability to see the obvious.
Dave "Crash" Dummy
2018-05-25 19:41:32 UTC
Permalink
Post by Dave "Crash" Dummy
I have a small VBS script that starts at startup and then runs
continuously in the background. How can I locate and stop the script?
I've done it before, but that was long before Windows 10 and the
onset of senility. I know there is a list of running applications
somewhere...
Okay, I found how to stop wscript.exe, but it doesn't say which script
it is hosting. I'll have to see what happens if I have multiple scripts
running.
--
Crash

I take great pride in my humility.
Auric__
2018-05-26 06:53:05 UTC
Permalink
Post by Dave "Crash" Dummy
Post by Dave "Crash" Dummy
I have a small VBS script that starts at startup and then runs
continuously in the background. How can I locate and stop the script?
I've done it before, but that was long before Windows 10 and the
onset of senility. I know there is a list of running applications
somewhere...
Okay, I found how to stop wscript.exe, but it doesn't say which script
it is hosting. I'll have to see what happens if I have multiple scripts
running.
Sysinternals Process Explorer will display a process's command line in the
Properties dialog. I imagine other, similar programs can as well.
--
You howl and wail like a banshee.
Dave "Crash" Dummy
2018-05-26 14:23:42 UTC
Permalink
Post by Auric__
Post by Dave "Crash" Dummy
Post by Dave "Crash" Dummy
I have a small VBS script that starts at startup and then runs
continuously in the background. How can I locate and stop the
script? I've done it before, but that was long before Windows 10
and the onset of senility. I know there is a list of running
applications somewhere...
Okay, I found how to stop wscript.exe, but it doesn't say which
script it is hosting. I'll have to see what happens if I have
multiple scripts running.
Sysinternals Process Explorer will display a process's command line
in the Properties dialog. I imagine other, similar programs can as
well.
Thanks! I have Process Explorer and located the instance of Wscript.exe
that is running my script.
--
Crash

I'm not archaic, I'm retro!
JJ
2018-05-26 07:24:21 UTC
Permalink
Post by Dave "Crash" Dummy
Post by Dave "Crash" Dummy
I have a small VBS script that starts at startup and then runs
continuously in the background. How can I locate and stop the script?
I've done it before, but that was long before Windows 10 and the
onset of senility. I know there is a list of running applications
somewhere...
Okay, I found how to stop wscript.exe, but it doesn't say which script
it is hosting. I'll have to see what happens if I have multiple scripts
running.
Use WMI's Win32_Process class to find the process commandline and kill it.
R.Wieser
2018-05-26 09:04:55 UTC
Permalink
Dave,
Post by Dave "Crash" Dummy
How can I locate and stop the script?
If stopping the script is all you're out for, than you could have it create
a dummy file (in the temp folder?) and have it regulary check if its still
there. If not, terminate.

That way the only thing you need to do is to delete that dummy file ...

Though I agree with the other posters that having a program handy by which
you can actually find the program which is running the script is
preferrable.

... just don't run the same script twice. :-)

Regards,
Rudy Wieser
Dave "Crash" Dummy
2018-05-26 14:34:01 UTC
Permalink
Post by R.Wieser
Dave,
Post by Dave "Crash" Dummy
How can I locate and stop the script?
If stopping the script is all you're out for, than you could have it
create a dummy file (in the temp folder?) and have it regulary check
if its still there. If not, terminate.
That way the only thing you need to do is to delete that dummy file ...
Thanks! I use text files to otherwise modify running scripts. In fact, a
modification to one of those data files is why I wanted to stop and
restart the script, which only loads the data at startup.
Post by R.Wieser
Though I agree with the other posters that having a program handy by
which you can actually find the program which is running the script
is preferrable.
Yes. As it happens, I am only running one script in the background so
there is only one instance of wscript.exe running, which I can stop in
Task Manager.
Post by R.Wieser
... just don't run the same script twice. :-)
No.

FYI, the script I wanted to restart is one that randomly selects the
quotation I include with my signature.
--
Crash

Whenever I meet a hot chick these days she's wearing scrubs.
Loading...