Cor*_*nus 4 string variables installshield
我试图在Installshield中有一个全局字符串,所以我可以在多个地方访问它.这是我第一次在脚本中运行.这是我有的:
STRING DIR;
....
DIR="c:\\tempdir";
function Completed_Action()
begin
// Here is where I try to access the DIR string.
Run Code Online (Sandbox Code Playgroud)
它不断给我错误.有没有办法拥有一个全局字符串并在任何函数之前设置它的值?我还应该补充一点,这是在主要的Setup.rul之后调用的子ril脚本中.
提前致谢.
小智 6
如果您使用的是InstallShield 11.5及更早版本,则可以初始化OnBegin方法中的任何变量.
使用InstallShield 12及更高版本,使用MsiSetProperty和MsiGetProperty(hMSI, "MyVariable", szSupportDir, nLen)设置和获取全局变量,因为当基本MSI安装执行InstallScript自定义操作时,编译的InstallScript在调用操作之前加载,并在操作完成后卸载.