Target Control Debugging: kp Command (Compact 2013)

3/26/2014

This command ends a process.

Syntax

kp [-r] <proc> [<proc2> <proc3> ...]

Parameters

  • -r
    Optional. Automatically refreshes the process list. You can use this argument instead of typing the gi proc command to see a list of running processes on the device attached to Platform Builder.
  • <proc>
    Specifies the process to end. This value can be the file name in the NAME column, or the index number in the PROC column that is displayed in the gi proc command; for example, kp MyProc.exe, kp MyProc, or kp 10.

    To end multiple processes, specify a list of process names or index numbers; for example, kp MLWD MyProc or kp 08 10.

Remarks

You can enter the command in two ways:

  • If the OS on your device supports the console window, you can bring up the Target Control window on your device by running shell -c. You can then enter the kp command at the shell command prompt on your device.
  • If you use Platform Builder, you can enter the kp command from the Visual Studio Target Control window.

Example

The following command example shows the kp command that you must enter to end a process. You can enter gi proc to show the list of processes that are currently running on the system. In this example, MyProc.exe is shown as index 10 from the PROC column, so you can either enter kp 10 or kp MyProc.exe to end the process.

Windows CE>gi proc
PROC: Name            PID      AcctId   VMBase   CurZone
 P00: NK.EXE          00400002 00000000 80016000 00000000
 P01: shell.exe       01a7000e 00000000 00010000 00000000
 P02: udevice.exe     01a2002a 00000000 00010000 00000000
 P03: udevice.exe     0147007a 00000000 00010000 00000000
 P04: dmsrv.exe       059e0006 00000000 00010000 00000003
 P05: servicesd.exe   04340022 00000000 00010000 00000000
 P06: GweUser.exe     04d50046 00000000 00010000 00000000
 P07: xrshell.exe     0477006e 00000000 00010000 00000000
 P08: MLWD.exe        05b2006a 00000000 00010000 00000000
 P09: ML.exe          07e8000e 00000000 00010000 00000000
 P10: MyProc.exe      069500a2 00000000 00010000 00000000
Windows CE>kp 10
Attempting to kill process of id 069500a2 ...Success

Windows CE>kp MyProc.exe
Attempting to kill process of id 069500a2 ...Success

See Also

Reference

Target Control Debugging