Solved

Stop an application

Posted on 2003-11-28
4
18,290 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error while running the scirpt 24 132
ESXi lockdown mode without vCenter connected? 10 102
how enable gpedit.msc in W10 Home edition? 8 445
dsquery command line assistance 2 107
Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
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.

786 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