开发者

Global String in Installshield

I am trying to do have a global string in Installshield so I can access it in multiple places. This is my first run at scripting in it. Here is what I have:

STRING DIR;

....

DIR="c:\\tempdir";

function Completed开发者_Go百科_Action()
begin
    // Here is where I try to access the DIR string.

It keeps giving me errors though. Is there any way to have a global string and set it's value before any functions? I should also add that this is in a sub rul script that is called after the main Setup.rul.

Thanks in advance.


If you are using InstallShield 11.5 and earlier, you can initialize any variables in an OnBegin method.

With InstallShield 12 and later, use MsiSetProperty and MsiGetProperty(hMSI, "MyVariable", szSupportDir, nLen) to set and fetch global variables because when a Basic MSI installation executes an InstallScript custom action, the compiled InstallScript is loaded before the action is called, and it is unloaded after the action completes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜