gflags 不标记任何二进制文件

gflags does not flag any binary

我正在尝试 运行 gflags 我的 Release x64 二进制文件上的 x64 由 Visual Studio 2013 构建以检测访问冲突。

我从 Microsoft 网站下载了 Windows 调试工具。
我将 C:\Program Files (x86)\Windows Kits\Debuggers\x64 添加到我的 PATH 环境变量中,gflagswindbg 在 Windows 提示符中找到。

编辑:添加了已经尝试过的命令

我尝试使用以下命令进行标记:
gflags /p /enable D:\MyBinary.exe /full /protect
gflags /p /enable D:\MyBinary.exe
gflags /p /enable MyBinary.exe /full /protect
gflags /p /enable -i MyBinary.exe /full /protect
gflags /p /enable /i MyBinary.exe /full /protect
gflags -p -enable -i MyBinary.exe -full -protect

然后我想检查二进制文件是否被正确标记为
gflags /p

MyBinary.exe 未列出,gflags /p 不显示任何内容。

我通过禁用 UAC 来重试,看看它是否不同,没有更好的结果。
我还尝试标记另一个二进制文件 (notepad++.exe),仍然没有标记。

我的命令有什么问题?

在管理员提示符下,此命令有效:
D:\>gflags /p /enable MyBinary.exe /full /protect path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options mybinary.exe: page heap enabled