View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Oct 21, 2002 8:04 pm Post subject: [Open Source]: Task Manager |
|
|
This might be a good way to learn about the built-in tools of Windows. A simple to advanced task manager could be built by using existing windows tools such as tasklist.exe and taskkill.exe to manage running processes. A memory and CPU monitoring tab could be built using VDSCPU.DLL (part of VDSDLL3.DLL) and using the scope or level elements (for VDS versions that don't have the scope or level element, I think it is available in the VDSELM.DLL.)
I don't know if this would work on operating systems other than Windows XP because it might not already have the tools, but it could still be possible to do this.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Oct 21, 2002 8:16 pm Post subject: |
|
|
Here is a basic task manager...
Code: | Title Task List
%%refresh = 2
DIALOG CREATE,Task List,-1,0,598,334
DIALOG ADD,STYLE,Courier,Courier New,,,,
DIALOG ADD,LIST,TaskList,0,0,598,300,,,Courier
DIALOG SET,TASKLIST,Please Wait...
DIALOG ADD,BUTTON,StopTask,304,6,100,24,Stop a Task
DIALOG SHOW
:Evloop
wait event,%%refresh
goto @event()
:timer
runh command.com /c tasklist.exe > tasks.txt
list loadfile,TaskList,tasks.txt
goto evloop
:StopTaskBUTTON
%%task = @input(Enter Image Name:)
if @ok()
runh taskkill.exe /F /IM %%task
warn Task Stopped
end
goto evloop
:Close
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Oct 21, 2002 9:27 pm Post subject: |
|
|
Hi, FF
tasklist.exe + taskkill.exe are not on my XP system. Just so you know that these files are maybe not
standard in XP distributions.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Oct 21, 2002 9:35 pm Post subject: |
|
|
Hmmm... I will check on my XP Home computer...right now I am using XP Professional.
Did you look in your C:\Windows\SYSTEM32 folder?
Try this to see if they exist:
Code: | title Check for File
if @file(@windir()\SYSTEM32\tasklist.exe)
warn File 'tasklist.exe' Found
else
warn File 'tasklist.exe' NOT found
end
if @file(@windir()\SYSTEM32\taskkill.exe)
warn File 'taskkill.exe' Found
else
warn File 'taskkill.exe' NOT found
end
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Oct 21, 2002 9:51 pm Post subject: |
|
|
I had already done a search on my entire Win drive - they aren't there. I use XP Home here, so you might
have stumpled upon a diff there.
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1564
|
Posted: Mon Oct 21, 2002 11:52 pm Post subject: |
|
|
I'm also using XP Home and those 2 files don't exist. Used the windows search feature for anything named task and those two files didn't show. |
|
Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Tue Oct 22, 2002 5:33 pm Post subject: |
|
|
On Windows XP Professional for me both files do exist and are functional in the way you described. |
|
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 May 01, 2004 4:32 pm Post subject: |
|
|
Yes, and also LIST TASKLIST _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat May 01, 2004 7:19 pm Post subject: |
|
|
While we are on the subject: if I have virusses or spyware, I make VDS programs to shut them down and to fix the registry until my virusscanner recognizes the virus/spyware. Unfortunatly, the killtask command won't work always because programs are looping or something. Does somebody know an API which can prevent this and which does always close a task? I looked at TerminateProcess, but I couldn't find out how to set the "PROCESS_TERMINATE access" right...  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat May 01, 2004 9:13 pm Post subject: |
|
|
I wrote an antivirus called Tech-Protect in VDS. You'll find it on my website, though I don't promote it particularly. It uses the F-Prot DOS scanner to do the virus checking, and it includes an FTP updater for it. It really works great for me. F-Prot for DOS is free for personal use but I bought a license which was something like $30 for up to 25 computers.
If Tech-Protect detects a virus in memory it will give you the option to terminate it and will remove the registry entries. It uses the KILLTASK command to terminate it. There shouldn't be a problem with that unless the virus was run as a service, and I don't think there are any viruses that do. The only viruses you'll have trouble with are the ones that run two processes, which restart each other if one is terminated.
I'd be interested to see what people think of my VDS antivirus. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun May 02, 2004 11:13 am Post subject: |
|
|
Right now I have some kind of new virus, which runs programs called "****_up.exe". When using the "list tasklist" command, I do get the proper names and process IDs, but VDS isn't able to close the programs...
Btw. Jules, I'll try your virusscan in a few moments...  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun May 02, 2004 12:09 pm Post subject: |
|
|
I spent all yesterday cleaning off a friend's computer that was amazingly
infested with spyware and viruses. I really am proud to say that I used
VDS several times to fix things - for example, a virus had disabled the
task manager and prevented me from opening the registry. So I used
VDS to list the tasks and I killed them one by one until the right process
was killed, then I was able to go into the registry editor and fix many
problems. I love VDS for these little uses it has along with the powerful
power it has.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
|
Back to top |
|
 |
Skit3000 Admin Team

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