在this answer之后,我试图在注册表中使用.dmp
开关设置-c "..."
shell命令,以便在我打开转储文件时执行命令。
虽然这适用于任何不使用引号的命令,但我现在想要使用需要引号的命令。如何避开引号,使它们不被视为-c "..."
开关的结束?
我试过了:
\"
""
详情如下:
注册表项:HKEY_CLASSES_ROOT\Windbg.DumpFile.1\shell\WinDbgStartup\command
(默认)值(工作):"C:\path to\windbg.exe" -z "%1" -Q -c ".echo Welcome"
(默认)值(已损坏):"C:\path to\windbg.exe" -z "%1" -Q -c ".echo Wel""come"
-z
用于打开转储文件,-Q
用于安静的工作空间,在-c
我可以输入命令,我想要包含quatation标记。
错误讯息:The command line arguments cannot specify more than one kind of debugging to start
WinDbg版本:6.2.9200.16384 X86
答案 0 :(得分:1)
你试过^"
吗? ^
转义cmd
(调查时)
-c " command "
Specifies the initial debugger command to run at start-up. This command must be
enclosed in quotation marks. Multiple commands can be separated with semicolons.
(If you have a long command list, it may be easier to put them in a script and
then use the -c option with the $<, $><, $><, $$>< (Run Script File) command.)
If you are starting a debugging client, this command must be intended for the
debugging server. Client-specific commands, such as .lsrcpath, are not allowed.
点击$...
超链接可进一步说明这些选项。
似乎你真的想在你的echo
中加入“。坦率地说,我不知道 - 但我会尝试的是-c ".echo Wel^"come"
如果这不起作用,我会前往$-option
gobbledegook。没有人(理智)声称在构建这些设施时已经考虑过所有可能性......