Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Ending tasks in command prompt

Posted on 2002-06-12
6
Medium Priority
?
218 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 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

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…
Whoever said that “a picture is worth one thousand words” observed a fact that can dramatically affect your marketing success. Most people tend to learn visually, so many publishers commonly acknowledge the effectiveness of visual learning by using…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

705 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