Solved

Ending tasks in command prompt

Posted on 2002-06-12
6
212 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
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now