我正在尝试让ADPlus运行PostCommand,但调用失败。
我首先使用的是配置文件,在旧版本的ADPlus中,我曾使用该文件调用PreCommand。配置文件如下所示:
...
<PostCommands>
<ShellSync>
<Application> C:\path\to\foo\foobar.exe </Application>
<Arguments> C:\foobar </Arguments>
</ShellSync>
</PostCommands>
...当我使用这个配置文件运行ADPlus时,我得到了以下错误,并且没有生成崩溃转储:
!!! ERROR !!!
Invalid key word: [C:\path\to\foo\foobar.exe]
at ADPlus.AdplusEngine.KeyWord2Command(String KeyWord, String Context, Boolean UseEscapedFlnm)
at ADPlus.AdplusEngine.ParseKeywords(String KeyWords, String Context, Boolean UseEscapedFlnm)
at ADPlus.AdplusEngine.CreateCDBScript(String FileName, AdplusApl CallingApl)
at ADPlus.AdplusApl.TryRun()
!!!ERROR - ADPlus failed to run看到它认为C:\path\to\foo\foobar.exe应该是一个关键字,我试着让它成为一个关键字,将我的配置文件更改为:
...
<KeyWords>
<KeyWord Name="FooBar"> C:\path\to\foo\foobar.exe </KeyWord>
</KeyWords>
...
<ShellSync>
<Application> FooBar </Application>
<Arguments> C:\foobar </Arguments>
</ShellSync>
...使用新的配置文件时,会生成一个转储文件,但之后我的PostCommand不会运行。我在ADPlus日志中得到以下错误:
...
0:004> * Post-commands
0:004> C:\path\to\foo\foobar.exe
Address expression missing from ':\path\to\foo\foobar.exe'
0:004> g
...请注意,在地址表达式缺失行中,驱动器名称C已被删除。
有谁知道为什么我的PostCommand不能运行吗?ADPlus的文档很少,但我遵循adplus.doc中给出的配置文件格式,它是微软调试器包的一部分。我在我的PostCommand周围尝试了各种引号和反斜杠的组合,但仍然有可能我没有正确地引用或转义某些东西。adplus.doc中的示例没有任何引号或转义字符。
发布于 2012-09-01 07:58:54
我可以通过将配置文件更改为:
...
<KeyWords>
<KeyWord Name="FooBar"> .shell -i- C:\path\to\foo\foobar.exe C:\foobar</KeyWord>
</KeyWords>
...
<ShellSync>
<Application> FooBar </Application>
</ShellSync>
...C:\foobar是传递给foobar.exe的参数。当我尝试将参数放在标记中时,它不起作用。或者,可以在-i指定的文件中提供参数。-i-没有指定输入文件,所以我提供了内联参数。
https://stackoverflow.com/questions/12219881
复制相似问题