处理 Sysinternals 软件不接受 -c 参数

Ale*_*lex 1 windows sysinternals

我正在尝试使用 Sysinternals Handle 软件 ( http://technet.microsoft.com/en-us/sysinternals/bb896655 )在 Windows 中关闭锁定文件的句柄。

首先我搜索打开的句柄:

handle.exe "C:\Temp"
Run Code Online (Sandbox Code Playgroud)

它向我发出以下问题:

Far.exe pid: 1144 类型: 文件 2E8: C:\Temp

Far.exe pid: 1144 类型: 文件 3A8: C:\Temp

接下来我使用 -c 参数运行 handle.exe。但是,无论我输入哪个数字,它都没有任何作用。我已经尝试过:1144、2E8、3A8 和 1144 十六进制(478),因为软件帮助说它接受十六进制的 PID。无论我输入什么,它只会发出以下内容:

Handle v3.46
Copyright (C) 1997-2011 Mark Russinovich
Sysinternals - www.sysinternals.com

usage: handle [[-a [-l]] [-u] | [-c <handle> [-y]] | [-s]] [-p <process>|<pid>] [name]
  -a      Dump all handle information.
  -l      Just show pagefile-backed section handles.
  -c      Closes the specified handle (interpreted as a hexadecimal number).
          You must specify the process by its PID.
          WARNING: Closing handles can cause application or system instability.
  -y      Don't prompt for close handle confirmation.
  -s      Print count of each type of handle open.
  -u      Show the owning user name when searching for handles.
  -p      Dump handles belonging to process (partial name accepted).
  name    Search for handles to objects with <name> (fragment accepted).

No arguments will dump all file references.
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

use*_*686 5

看来您还必须指定进程ID:

handle -c 2e8 -p 1144
Run Code Online (Sandbox Code Playgroud)