Install4j:如何在启动器的Java调用中指定密码值 [英] Install4j: how to specify a password value in Java Invocation of Launcher
问题描述
在Install4j
中,我有一个表单可以让用户配置登录名/密码(变量名:login
和password
)
In Install4j
, I have a form to let the user configure a login/password (with the variable names: login
and password
)
然后,我想使用Java Invocation Launcher中的登录名/密码值创建启动器.
Then I want to create a launcher using the login/password values in Java Invocation Launcher.
请参见下面的屏幕截图.
See the screenshot below.
- 安装后如何调试以查看这些参数的值?
-
${installer:password}
确实是用户输入的值吗?
- How can I debug to see the value of these arguments after the installation ?
- The
${installer:password}
is really the entered value by the user ?
推荐答案
您可能使用密码字段"表单组件.密码字段组件的绑定变量未写入响应文件.这就是为什么发射器不可用的原因.
You probably use a "Password field" form component. The bound variable for a password field component is not written to the response file. That's why it's not available for the launchers.
为另一个变量(即"clearPassword")添加设置变量"操作,将脚本设置为
Add a "Set a variable" action for another variable, i.e. "clearPassword", set the script to
context.getVariable("password")
,然后选择该操作的注册响应文件"属性.然后,您可以在启动器参数中使用${installer:clearPassword}
.
and select the "Register for response file" property of that action. Then you can use ${installer:clearPassword}
in the launcher arguments.
还有一个错字,应该是${installer:login}
而不是{installer:login}
.
Also you have a typo, it should be ${installer:login}
and not {installer:login}
.
这篇关于Install4j:如何在启动器的Java调用中指定密码值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!