Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ending tasks in command prompt

Posted on 2002-06-12
6
Medium Priority
?
220 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 800 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
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

971 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