forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


kill Tasks

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Thu Apr 17, 2003 6:45 am    Post subject: kill Tasks Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Apr 17, 2003 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Thu Apr 17, 2003 8:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Apr 17, 2003 8:56 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Thu Apr 17, 2003 2:36 pm    Post subject: Reply with quote

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. Smile

moke
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Apr 17, 2003 7:16 pm    Post subject: Reply with quote

Included with Windows XP Professional includes an app called 'taskkill.exe'
which can do this. I'm looking into a DLL that does this... Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Apr 17, 2003 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Apr 17, 2003 8:05 pm    Post subject: Reply with quote

Right.
Mr. Innocent-looking Garrett! Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Apr 18, 2003 1:46 am    Post subject: Reply with quote

gotcha garrett...i thought that i remembered right Smile

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jun 21, 2003 9:40 pm    Post subject: Reply with quote

Well now there's a KILLTASK command in VDS 5! Smile
_________________
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
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Jun 22, 2003 6:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group