How to end tasks, using command-line prompt?

Permabanned
Joined
10 Apr 2004
Posts
13,122
Location
Darlington, County Durham
Basically I want to end a task from the command-line prompt shell in Windows (Start > Run > CMD).

I'm sure there's a command for doing this, but I've gone and forgotten it! :o
 
what i do is download pskill, rename it "k.exe" put it in the windows\system32 folder, then you can use the run box to use it..

Start, Run

k notepad

kills notepad for you :)

also, if you make a shortcut to a program (say amp.lnk for winamp) you can run that program from the run box if you copy the shortcut to system32 folder, i open 90% of things i use through the run box
 
You shouldnt be dumping things in System32 for that. Create your own folder somewhere (My Docs\My apps or something) and add that folder to the PATH environment variable (Conrol Panel > System > Advanced > Environment Variables).

Same result and keeps you out of system directories.
 
Or you can simply use:

net start/stop <service name>

net start on it's own will display a list of started services. :)

Edit: Obviously when OP said task I thought that meant service, just in case they weren't. Should also work within a batch file as I had that for anti-virus services when playing games.
 
Last edited:
Otacon said:
You shouldnt be dumping things in System32 for that. Create your own folder somewhere (My Docs\My apps or something) and add that folder to the PATH environment variable (Conrol Panel > System > Advanced > Environment Variables).

Same result and keeps you out of system directories.


the best place to put them is here

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

but for the average joe, they'll feel more comfortable putting a few .lnk files in system32 folder, it'll do no harm
 
bledd. said:
the best place to put them is here

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
Better than an environment variable? How so.

Personally I have no preference to either way, so long as system32 is kept clear of crap.
 
That IS handy! Now... is there any way I can run Windows purely from the command prompt and not have the desktop and explorer.exe load up?:D
 
well on a computer in my room, i only use it to play music. It's an old school computer so obviously not a very high spec. I can do anything that i've needed to from the task manager
 
manveruppd said:
That IS handy! Now... is there any way I can run Windows purely from the command prompt and not have the desktop and explorer.exe load up?:D
Overwrite the Winlogon\Shell registry value with cmd.exe (instead of exporer.exe)... if you really wanted to :p

Windows really isn't shell friendly though if that's your thing. For true power from the command line, you want linux.
 
Might not be relevant but I combine slick run and batch files to kill programs on my PC.

Mainly I have all my gaming apps setup in a batch file so when I press ALT + W and type off it kills 4 applications, steam, teamspeak, xfire and HLSW.
 
Back
Top Bottom