Solved

Stop an application

Posted on 2003-11-28
4
18,294 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
[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
4 Comments
 
LVL 2

Expert Comment

by:Raybans
ID: 9836292
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
ID: 9842002
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
ID: 9846950
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
ID: 9879531
Not with Win 3.x, 9x, ME and alike.. Only the NT family of Operating Systems come with task killers..
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Clickfree HD 6 142
How to move files saved within Google Drive to other folder 3 72
Independent OS 7 50
Registry key for Explorer context menu controlling drives 7 28
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 …
Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

730 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