Stop an application

If I am running an application (ie notepad) could I run a Dos command to stop it?

If so - how?
AndyOAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RaybansTechnical ManagerCommented:
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
mrfujiCommented:
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
Joseph_MooreCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pegasysCommented:
Not with Win 3.x, 9x, ME and alike.. Only the NT family of Operating Systems come with task killers..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.