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 


is there a way to check if an app is running and kill it?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Jan 30, 2004 2:32 pm    Post subject: is there a way to check if an app is running and kill it? Reply with quote

If say appx.exe was running and i could see it in task manager, could i kill it using vds and then check if it has closed or not?
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Jan 30, 2004 3:41 pm    Post subject: Reply with quote

VDS5 has a KILLTASK command. That should do the trick as far as the kill goes...

Then use LIST TASKLIST to check if it's a gonner.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Jan 30, 2004 4:10 pm    Post subject: Reply with quote

I haven't tried this, but it should work... It just gets all current tasks. If the specified task is found, it will be killed and it will be checked if it is killed indeed. If so, it will return 'killed'. If it isn't kill, it will return nothing... Smile

Code:
#define function,Taskkiller

if @taskkiller(appx.exe)
  info The task is closed.
  else
  warn The task isn't closed...
  end

exit

:Taskkiller
list create,29
list tasklist,29,|NI
if @match(29,|%1|)
  parse ";%%TaskName",@item(29)
  killtask %%TaskName
  list close,29
  list create,29
  list tasklist,29,|NI
  if @match(29,|%1|)
    list close,29
    exit
    else
    list close,29
    exit KILLED
    end
  else
  list close,29
  exit
  end
exit

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Jan 30, 2004 4:53 pm    Post subject: Reply with quote

killer ... Killed
Criminal script Wink LOL

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension


Last edited by CodeScript on Fri Jan 30, 2004 4:59 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Jan 30, 2004 4:55 pm    Post subject: Reply with quote

I dont have vds 5 only 4, so i cant use the new functions.
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Jan 30, 2004 5:09 pm    Post subject: Reply with quote

Do U want to kill a specific task whose name U already know or find it.
former can be done easily using API - Gadget /VDSUG dll in VDS 3-4.x

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Jan 30, 2004 6:19 pm    Post subject: Reply with quote

Maybe somebody with VDS 5 could compile such a script for you, so that you can use it as a command-line tool... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Jan 30, 2004 9:12 pm    Post subject: Reply with quote

Yes i do know what app i wish to kill. but if i use a dll can i check if the app was closed?
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Fri Jan 30, 2004 9:32 pm    Post subject: Reply with quote

Skit3000 wrote:
Maybe somebody with VDS 5 could compile such a script for you, so that you can use it as a command-line tool... Smile


Instead of doing that, which might cause some concerns about license
issues, how about just downloading a command line program that's
already made for killing tasks?

Download the following zip of utils and you'll find an exe in there for
killing tasks.

http://porthos.ist.utl.pt/ftp/windows/utils/unix95.7.zip

That's not the official download location, but the only one I could find
these days. The home page that archived this set of tools is now gone.

_________________
'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
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Jan 31, 2004 12:21 pm    Post subject: Reply with quote

Skit3000 wrote:
Maybe somebody with VDS 5 could compile such a script for you, so that you can use it as a command-line tool... Smile


I thought it was OK - tommorow say vds allows to compile dlls - one can distribute it for use in other programs which may not be even in vds or older vds apps using gadget or vdsug just wondering.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Jan 31, 2004 1:39 pm    Post subject: Reply with quote

I would love it if it could compile dlls... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jan 31, 2004 2:41 pm    Post subject: Reply with quote

Skit3000 wrote:
I would love it if it could compile dlls... Smile


Me too! That would be awesome. Very Happy

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


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Sat Jan 31, 2004 6:53 pm    Post subject: Reply with quote

Garrett wrote:
Skit3000 wrote:
Maybe somebody with VDS 5 could compile such a script for you, so that you can use it as a command-line tool... Smile


Instead of doing that, which might cause some concerns about license
issues, how about just downloading a command line program that's
already made for killing tasks?

Download the following zip of utils and you'll find an exe in there for
killing tasks.

http://porthos.ist.utl.pt/ftp/windows/utils/unix95.7.zip

That's not the official download location, but the only one I could find
these days. The home page that archived this set of tools is now gone.


Thanks for the link, i would much rather use some dos program then break any EULA's or anything.
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Sat Jan 31, 2004 9:07 pm    Post subject: Reply with quote

I don't know if it would be breaking any eula at all though, it just
sounds like it could be a possible problem. Hopefully someone
else here who understands these things better will drop in here and
give some light on this.

_________________
'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
Dave Heck
Valued Newbie


Joined: 02 Mar 2002
Posts: 34
Location: Union, CT USA

PostPosted: Sun Feb 29, 2004 12:27 pm    Post subject: Free tool from Systernals Reply with quote

You probably already have found a solution, but if not - there is a freeware tool from Systernals called pskill.exe that will kill a running process if you know it's name or ID. To kill "appx.exe" just make sure the pskill.exe is either in the path or fully qualify the location of the .exe

http://www.sysinternals.com/ntw2k/freeware/pstools.shtml

If pskill.exe is in the path:
SHELL OPEN,PSKILL.EXE,APPX

Fully qualified:
SHELL OPEN,C:\DIRECTORY\PSKILL.EXE,APPX

_________________
Dave Heck
dheck1961@cox.net
Union, Connecticut USA
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous 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