| View previous topic :: View next topic |
| Author |
Message |
thomas Newbie
Joined: 15 Jan 2003 Posts: 23 Location: Germany
|
Posted: Thu Apr 17, 2003 6:45 am Post subject: kill Tasks |
|
|
Hello,
I have a List of 32 EXE - Files. Now I need a Funktion that look for each Exe file, if this File is started. When the File is startet (as a Task at Taskmanager) than this Exe must be killed.
Example:
If Test.exe is started
then kill test.exe
else
goto next file
end
Is this possible to solute this with vds. If not, does anybody know an other Script Language that can do this. |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Apr 17, 2003 7:43 am Post subject: |
|
|
hi thomas,
i'm making this up off the top of my head
| Code: |
:timer
wait event, 0.5
list create, 1
list winlist, 1, n
list seek, 1, 0
if @match(1,%%your_program_name)
rem the code to close the program goes here - not sure how to do this
end
goto @event() |
is this what you are after?
the WINLIST option of LIST lists all the programs that are running as explained in the help file
| Quote: | WINLIST is used to obtain a list of all the windows (including hidden windows) present on the system. The flags may be specified as: C - class name; I - window identifier; N - window name or title. If more than one flag is specified then the values are concatenated in the list with each one separated by the current field separator character in a form suitable for splitting up with the PARSE command.
Copyright © 1995 - 2002 S.A.D.E. s.a.r.l. / All rights are reserved. |
so, you are loading the names of the programs running into a list and then you want to see if a given program is listed or not
hope this helps
Serge _________________
|
|
| Back to top |
|
 |
thomas Newbie
Joined: 15 Jan 2003 Posts: 23 Location: Germany
|
Posted: Thu Apr 17, 2003 8:49 am Post subject: |
|
|
Thanks Serge,
but the Tasks (EXE-Files) that I want to kill, have no window. So, winlist do not lists this file. |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Apr 17, 2003 8:56 am Post subject: |
|
|
in that case, i don't know thomas...sorry!
i think that vds 5 has the capability of listing tasks running...perhaps someone who knows can verify this...
Serge _________________
|
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Thu Apr 17, 2003 2:36 pm Post subject: |
|
|
Hi Thomas,
I think you can find out if the file is open (running) using the VDSINOUT.DLL. The @IO(MSNBR) & IO(MSLIN) functions can return an error when attempting to read/write to an open file. I've never tried it with an exe but i'm pretty sure it wil work.
moke |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Apr 17, 2003 7:16 pm Post subject: |
|
|
Included with Windows XP Professional includes an app called 'taskkill.exe'
which can do this. I'm looking into a DLL that does this...  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Apr 17, 2003 8:02 pm Post subject: |
|
|
Soon there will be no need for any dll for what Thomas needs, and that's
all I'm saying!
I don't know what you're talking about! I don't know what I'm talking
about! This conversation never happened!
-Garrett |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Apr 17, 2003 8:05 pm Post subject: |
|
|
Right.
Mr. Innocent-looking Garrett!
 _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Apr 18, 2003 1:46 am Post subject: |
|
|
gotcha garrett...i thought that i remembered right
Serge _________________
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jun 21, 2003 9:40 pm Post subject: |
|
|
Well now there's a KILLTASK command in VDS 5!  _________________ FreezingFire
VDSWORLD.com
Site Admin Team
Last edited by FreezingFire on Sun Jun 22, 2003 10:37 am; edited 1 time in total |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Jun 22, 2003 6:07 am Post subject: |
|
|
and TASKLIST which lists all running exe's etc...
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|