[运行]部分中带引号的Inno Setup参数 [英] Inno Setup parameter with quotes in [Run] section

查看:230
本文介绍了[运行]部分中带引号的Inno Setup参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 [Run] 部分通过支持命令的 commandmerit.exe 来修改某些编解码器的价值。

I use [Run] section to modify the merit value of some codecs with commandmerit.exe that supports command-line.

所以语法是:

Commandmerit.exe "{E2B7DF46-38C5-11D5-91F6-00104BDB8FF9}" "0x800000"  

{E2B7DF46-38C5-11D5-91F6-00104BDB8FF9} 是编解码器的CLSID,
0x800000 是新代码的值优点,但是当我将此行放在 [Run] 部分时:

{E2B7DF46-38C5-11D5-91F6-00104BDB8FF9} is the CLSID of the codec and 0x800000 is the value of the new merit, but when I put this line in [Run] section :

Filename: "{app}\Commandmerit.exe"; Parameters: ""{F8FC6C1F-DE81-41A8-90FF-0316FDD439FD}" "0x10000000""; WorkingDir: "{app}"

显示流动错误:


参数的引号不匹配或放错位置。

Mismatched or misplaced quotes on parameter.

如果我把这行放在下面:

If I put this line:

Filename: "{app}\Commandmerit.exe"; Parameters: """{F8FC6C1F-DE81-41A8-90FF-0316FDD439FD}" "0x10000000"""; WorkingDir: "{app}"

显示流动错误:


未知常量......如果.....

Unknown constant ...... use two consecutive"{" if .....


使用两个连续的 {

如果我输入以下行:

If I put this line:

Filename: "{app}\Commandmerit.exe"; Parameters: """{{F8FC6C1F-DE81-41A8-90FF-0316FDD439FD}}" "0x10000000"""; WorkingDir: "{app}"

然后没有错误显示,但是 commandmerite.exe 不了解该参数,因此安装程序完成后,优点仍然保持不变。

Then no error is displayed but it seems that the commandmerite.exe don't understand the parameter, so after the installer finishes the merit still unchanged.

推荐答案

要将引号添加到参数中,必须将每个引号加倍,然后将引号放在整个值周围。

To add quotes to a parameter, you must double up each quote, and then put quotes around the entire value.

您的第二次尝试已结束,但您忘记了

Your second attempt was close but you forgot the middle ones.

Filename: "{app}\Commandmerit.exe"; Parameters: """{F8FC6C1F-DE81-41A8-90FF-0316FDD439FD}"" ""0x10000000"""; WorkingDir: "{app}"

这篇关于[运行]部分中带引号的Inno Setup参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆