Solved

Stop an application

Posted on 2003-11-28
4
18,279 Views
Last Modified: 2011-08-18
If I am running an application (ie notepad) could I run a Dos command to stop it?

If so - how?
0
Comment
Question by:AndyO
4 Comments
 
LVL 2

Expert Comment

by:Raybans
Comment Utility
yes

there is a command from the Windows NT4 resource kit you can use

in Windows XP you can use taskkill command

http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/WINDOWSXP/home/using/productdoc/en/taskkill.asp

you just need to know the name of the process or task

you can use the task manager to test and check for what it may be

notepad will be notepade.exe

so in Windows XP

taskkill /s userspcname /u domainname\adminaccount /p mypassword /im notepad.exe

this should kill the notepad session on the "userspcname" with your credientials
0
 
LVL 1

Expert Comment

by:mrfuji
Comment Utility
The tool you need is already in XP.

tskill.exe

you just need to know the process id or process name.

ex.  tskill notepad
0
 
LVL 6

Accepted Solution

by:
Joseph_Moore earned 125 total points
Comment Utility
Actually, I am looking at my XP Professional machine, and it came with both TSKILL.EXE and TASKKILL.EXE

Personally, I use TASKKILL.EXE to cancel processes from the command line. It has the /F switch to Force a task to end. TSKILL.EXE does not have such a function. So, it could happen that TSKILL could not stop a process, whereas TASKKILL could.

TASKKILL.EXE is also nicer (IMHO) since you can use it to kill a task on a remote system also.

Also, if you run Win2K or NT4, you could use PSKILL.EXE from Sysinternals. Basically, the same thing as TASKKILL, only it works with Win2K/NT. You can get it for free here:

http://www.sysinternals.com/ntw2k/freeware/pskill.shtml

hope this helps
0
 
LVL 7

Expert Comment

by:pegasys
Comment Utility
Not with Win 3.x, 9x, ME and alike.. Only the NT family of Operating Systems come with task killers..
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

Suggested Solutions

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

728 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

10 Experts available now in Live!

Get 1:1 Help Now