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 


[Open Source]: Task Manager
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript Open Source Projects
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Oct 21, 2002 8:04 pm    Post subject: [Open Source]: Task Manager Reply with quote

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

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


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Oct 21, 2002 8:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


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

PostPosted: Mon Oct 21, 2002 9:27 pm    Post subject: Reply with quote

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


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Oct 21, 2002 9:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


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

PostPosted: Mon Oct 21, 2002 9:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Mon Oct 21, 2002 11:52 pm    Post subject: Reply with quote

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


Joined: 16 Nov 2002
Posts: 737
Location: The Netherlands

PostPosted: Tue Oct 22, 2002 5:33 pm    Post subject: Reply with quote

On Windows XP Professional for me both files do exist and are functional in the way you described.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


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

PostPosted: Sat May 01, 2004 2:18 pm    Post subject: Reply with quote

For the people who are wanting to develop a kind of Task Manager in the future: VDS now has the killtask function which does the same as the program described by FreezingFire... 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 May 01, 2004 4:32 pm    Post subject: Reply with quote

Yes, and also LIST TASKLIST
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
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 May 01, 2004 7:19 pm    Post subject: Reply with quote

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... Sad
_________________
[ 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
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Sat May 01, 2004 9:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Sun May 02, 2004 11:13 am    Post subject: Reply with quote

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

Btw. Jules, I'll try your virusscan in a few moments... 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: Sun May 02, 2004 12:09 pm    Post subject: Reply with quote

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. Very Happy

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


Joined: 30 Jul 2002
Posts: 172

PostPosted: Sun May 02, 2004 4:57 pm    Post subject: Reply with quote

I think calling this dll would do the trick. But my limited API programing skills wouldnt let me knock out an example in a reasonable amount of time. I'm sure one of you guys could handle this without beating your heads againt the wall.

[url]
http://www.vbaccelerator.com/home/VB/Tips/Getting_Process_Information_Using_PSAPI/article.asp
[/url]
Back to top
View user's profile Send private message
Skit3000
Admin Team


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

PostPosted: Sun May 02, 2004 5:58 pm    Post subject: Reply with quote

Nice DLL! I'll take a look soon... 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
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript Open Source Projects All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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