Solved

Ending tasks in command prompt

Posted on 2002-06-12
6
216 Views
Last Modified: 2010-04-13
I need to know if there is a way to stop and end tasks or processes that are running on a windows 2000, XP, 98, and 95 PC for wihtin the command prompt or when booting into the PC with a win9x bootdisk. I have had some users open an email virus that just puts a setup.exe into the startup folder in the startmenu and you can't end the task to delete the file. Not a bad virus just really annoying. But I'd like to create a batch file it this is possible and mail it to those that opened it and have then run it so I don't have to go to the 100 some odd users that opened it.

Thanks a ton
RBennett

 If you would like to read about it go to www.mcafee.com go to the virus info lib. and search for password and click the first link.
0
Comment
Question by:Ryan Bennett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7073656
Go to http://www.sysinternals.com/ntw2k/freeware/pstools.shtml and get these command line utilities 'pskill' can certainly do what you want.

>>or when booting into the PC with a win9x bootdisk

Err, when you boot your system from a (DOS!) boot disk, you won't have to kill a process...
0
 
LVL 4

Expert Comment

by:Nevaar
ID: 7073781
How about deleting the executable and the menu link via a domain login script?
0
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 7075605
jkr is on the right track.  You can use pskill in a batch file to kill the process and then do something like

del C:\documents and settings\%user%\Start Menu\

%user% is something I made up.  You would have to find a utility to return who is currently logged into the variable.  WhoamI (http://www.simtel.net/pub/pd/57930.html) might help, but I'm not sure how to pipe its username info into the batch variable.  Perhaps Windows 2000 already defines an environmental variable that someone can confirm or deny.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 22

Expert Comment

by:Adam Leinss
ID: 7075613
Oh yeah, if you do have a domain setup, Nevaar's solution is VERY easy!
0
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 7075645
Just took a guess and %USERNAME% holds the name of the current user that is logged in:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

Z:\>echo %username%
ALeinss

So use %username% instead of %user%
0
 

Author Comment

by:Ryan Bennett
ID: 7075714
Never before have I gotten answers that would all solve my problem, I would like to award the points to you all!! Thanks a bunch for your time an efferts.

 These pstools rock! Thanks for the link. After running this all they had to do was right-click and del the shortcut out of their start menu I didn't even have to leave my office once.

 The domain would have worked but we don't have a domain setup yet but thanks.
 And the batch file tips would really help buy they seem to have taken care of the shortcut ok thanks!!

 Great,
 RBennett

 
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question