Articles

Solved Taskkill is not recognized as command?

December 9, 2009 at 21:15:48
Specs: Windows XP

Well I just recently had a com sent to me in which I was going to program a few .bat files to do the things that he normally does when he gets on his com. However when I tried testing a taskkill command, it didn't work so I opened up cmd manually and typed "TASKKILL /IM notepad.exe" without quotes and hit enter and received that unrecognized notice. I am running cmd with admin privileges and using Win XP OS. Any ideas?

See More: Taskkill is not recognized as command?

Report •


✔ Best Answer
December 10, 2009 at 00:28:19

Xp home does have the less powerful "tskill", the trick is to not specify the extension.

tskill notepad

Pskill seems to be another utility with a very similar name.


Batch Variable how to



#1
December 9, 2009 at 21:32:34

TASKKILL isn't included in XP Home is it?

-Ryan Adams

Free Computer Tips and more:http://RyanTAdams.com
Paid Tech Support: Black Diamond


Report •

#2
December 9, 2009 at 21:54:08

I'm not sure. I haven't used XP in years. I've always used vista. And if that really is the case, is there a command for vista that is similar to taskkill?

Report •

#3
December 9, 2009 at 22:25:20

http://greasypc.blogspot.com/2008/0...

-Ryan Adams

Free Computer Tips and more:http://RyanTAdams.com
Paid Tech Support: Black Diamond


Report •

Related Solutions

#4
December 9, 2009 at 23:34:16

Alright now how would I use that command? I've looked at the example and have no idea it's trying to do there. There is no .exe extension to notepad and when I try plugging in "PSKILL notepad.exe", it does nothing.

Report •

#5
December 9, 2009 at 23:49:28

I was actually referring to the taskkill download listed on that page. Direct link: http://home.wanadoo.nl/gigajosh/fil...

Just drop that in the Windows directory (or anywhere in your PATH) and then you can use taskkill as you would on a XP Pro system.

-Ryan Adams

Free Computer Tips and more:http://RyanTAdams.com
Paid Tech Support: Black Diamond


Report •

#6
December 10, 2009 at 00:28:19
✔ Best Answer

Xp home does have the less powerful "tskill", the trick is to not specify the extension.

tskill notepad

Pskill seems to be another utility with a very similar name.


Batch Variable how to


Report •

#7
December 10, 2009 at 05:28:34

PSKILL is part of the PsTools Suite, from Microsoft's SysInternals.

With XP home, you might be able to use WMI to kill processes, but that's a pain.


Report •

#8
December 10, 2009 at 05:35:27

Razor,

"With XP home, you might be able to use WMI to kill processes, but that's a pain.

No joy, unless the executable can be downloaded somewhere....

C:\Documents and Settings\judago>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Documents and Settings\judago>wmic
'wmic' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\judago>dir /s /b c:\wmic.exe
File Not Found


Batch Variable how to


Report •

#9
December 10, 2009 at 06:33:07

WMIC is included with one of the Windows Resource Kits (2K3's, I think). I was talking more about using VBScript.
For Each p In GetObject("winmgmts:").ExecQuery(_
 "SELECT * FROM Win32_Process WHERE ExecutablePath LIKE ""%\\notepad.exe""")
  p.Terminate
Next 'p


Report •

#10
December 10, 2009 at 07:13:17

The vb script works fine on xp home.

I must learn vb script one of these days......


Batch Variable how to


Report •

#11
December 10, 2009 at 12:32:54

Nah, MS is trying to phase out VBScript in favor of Power Shell. (Henceforth POWER SHELL!) I've dabbled in POWER SHELL! a few years ago, but seeing as PS! is built into Win7 and everyone's hopping on the Win7 bandwagon, now might be a good time to learn POWER SHELL!

It's like Command Scripting, only better/worse!


Report •

#12
December 10, 2009 at 13:12:10

I had a quick dabble in PS! a while ago myself, can't say I particularly liked it on first impression. Since it was a only a download then I couldn't see any reason to use it over something like python.

I like the tag line, maybe it will catch on. Is it just me or does in scream out infomercial when power shell is in all caps with the exclamation mark?

"POWER SHELL! - the amazing new add in from M$ but don't take our word for it here's what out customers had to say: "It's like Command Scripting, only better/worse!" - wow you just know it's going to be worth the 4 easy payments of.....but wait there's more! Order in the next ten minutes and you will receive 5 - that's right 5 - cmdlets completely free! "


Batch Variable how to


Report •


Ask Question