| View previous topic :: View next topic |
| Author |
Message |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Fri Jan 30, 2004 2:32 pm Post subject: is there a way to check if an app is running and kill it? |
|
|
| 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 |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Jan 30, 2004 3:41 pm Post subject: |
|
|
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 |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Fri Jan 30, 2004 4:10 pm Post subject: |
|
|
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...
| 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 |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Jan 30, 2004 4:53 pm Post subject: |
|
|
killer ... Killed
Criminal script LOL _________________ Regards
- CodeScript
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 |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Fri Jan 30, 2004 4:55 pm Post subject: |
|
|
| I dont have vds 5 only 4, so i cant use the new functions. |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Jan 30, 2004 5:09 pm Post subject: |
|
|
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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Fri Jan 30, 2004 9:12 pm Post subject: |
|
|
| 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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Jan 30, 2004 9:32 pm Post subject: |
|
|
| 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...  |
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 |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Jan 31, 2004 12:21 pm Post subject: |
|
|
| 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...  |
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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jan 31, 2004 2:41 pm Post subject: |
|
|
| Skit3000 wrote: | I would love it if it could compile dlls...  |
Me too! That would be awesome.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Sat Jan 31, 2004 6:53 pm Post subject: |
|
|
| 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...  |
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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Jan 31, 2004 9:07 pm Post subject: |
|
|
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 |
|
 |
Dave Heck Valued Newbie

Joined: 02 Mar 2002 Posts: 34 Location: Union, CT USA
|
Posted: Sun Feb 29, 2004 12:27 pm Post subject: Free tool from Systernals |
|
|
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 |
|
 |
|