开发者

CMD - how to write %

I am using windows cmd and i am trying to do the following:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v debugger /t REG_SZ /d "%ENVIROMENT VAR%utils\cdb.exe -pv -p %ld -c """.dump /u /ma c:\utils\1.dmp;qd""" "

As you see, first enviroment varialbe is between % and is expanded by开发者_Python百科 cmd, then %ld should be written as is. However, it is considered to be start of varialbe by CMD, so this fails. I guess i need to add some escape character, but it failed.

How to set this correctly?


Use a caret (^) to escape the % so the problematic line becomes:

REG_SZ /d "%ENVIROMENT VAR%utils\cdb.exe -pv -p ^%ld -c """.dump /u /ma c:\utils\1.dmp;qd""" "

Paddy

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜