Following this answer, I'm trying to set up a .dmp
shell command in the Registry using the -c "..."
switch to execute commands whenever I open a dump file.
While this works for any commands not using quotation marks, I'd now like to use a command which needs quotation marks. How can I escape the quotation marks to that they are not seen as the end of the -c "..."
switch?
I tried:
- escaping with a backslash
\"
- escaping by doubling the quotation marks
""
Details are :
Registry key: HKEY_CLASSES_ROOT\Windbg.DumpFile.1\shell\WinDbgStartup\command
(Default) value (working): "C:\path to\windbg.exe" -z "%1" -Q -c ".echo Welcome"
(Default) value (broken): "C:\path to\windbg.exe" -z "%1" -Q -c ".echo Wel""come"
-z
is for opening a dump file, -Q
is for quiet workspaces, at -c
I can enter commands and I want to include quatation marks.
Error message: The command line arguments cannot specify more than one kind of debugging to start
WinDbg Version: 6.2.9200.16384 X86
Have you tried
^"
?^
escapes most characters incmd
(On investigation)
Quote fromWinDbg Command-Line Options
And clicking on the
$...
hyperlink further explains these options.Seems that you actually want to include the " in your
echo
. Frankly, I've no idea - but what I'd try would be-c ".echo Wel^"come"
and if that doesn't work, I'd go off to the
$-option
gobbledegook. No-one (sane) ever claimed that every possibility had been considered in constructing these facilities...