显示标签为“DOS”的博文。显示所有博文
显示标签为“DOS”的博文。显示所有博文

2008年2月11日星期一

How to kill a process under Windows 2000

You can kill a process with "taskkill /IM notepad.exe" under Windows XP and above.
However, under Windows 2000, this command is not supported. If you copy this taskkill.exe from XP to 2000, you will get a not supported warning.

So, you need other executables to do this.

Microsoft provides us PsKill to do this(even kill process in a remote computer).
Download PsKill.exe from http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx

Just substract it and copy it to system32 folder.

Run like this pskill notepad.exe.

Remember, the first time you run this command, you need to agree a license.

or you can try this one http://www.beyondlogic.org/solutions/processutil/processutil.htm

2007年12月24日星期一

How to kill a process under DOS/WINDOWS?

怎样在DOS中关闭一个进程?使用taskkill命令。
http://www.tech-recipes.com/rx/446/xp_kill_windows_process_command_line_taskkill
Use taskkill command.

>>help taskkill

TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]

Description:
This tool is used to terminate tasks by process id (PID) or image name.

Parameter List:
/S system Specifies the remote system to connect to.

/U [domain\]user Specifies the user context under which the
command should execute.

/P [password] Specifies the password for the given user
context. Prompts for input if omitted.

/FI filter Applies a filter to select a set of tasks.
Allows "*" to be used. ex. imagename eq acme*

/PID processid Specifies the PID of the process to be terminated.
Use TaskList to get the PID.

/IM imagename Specifies the image name of the process
to be terminated. Wildcard '*' can be used
to specify all tasks or image names.

/T Terminates the specified process and any
child processes which were started by it.

/F Specifies to forcefully terminate the process(es).

/? Displays this help message.

Filters:
Filter Name Valid Operators Valid Value(s)
----------- --------------- -------------------------
STATUS eq, ne RUNNING |
NOT RESPONDING | UNKNOWN
IMAGENAME eq, ne Image name
PID eq, ne, gt, lt, ge, le PID value
SESSION eq, ne, gt, lt, ge, le Session number.
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format
of hh:mm:ss.
hh - hours,
mm - minutes, ss - seconds
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
USERNAME eq, ne User name in [domain\]user
format
MODULES eq, ne DLL name
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title

NOTE
----
1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
2) Termination of remote processes will always be done forcefully (/F).
3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
machine is specified.

Examples:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

2007年12月5日星期三

DOS command for Batch file.

Microsoft DOS start command
The start command is an internal command that is available in the below Microsoft Operating Systems.
http://www.computerhope.com/starthlp.htm

For some command for the batch file see:
http://www.aumha.org/a/batches.php

2007年3月22日星期四

DOS Command

Check DOS Command and brief explanation and examples,
see http://timisme1980.googlepages.com/DOS.pdf