Global line in Installshield

I am trying to make a global line in Installshield so that I can access it in several places. This is my first script run in it. Here is what I have:

STRING DIR; .... DIR="c:\\tempdir"; function Completed_Action() begin // Here is where I try to access the DIR string. 

He keeps giving me mistakes. Is there a way to have a global string and set its value in front of any functions? I should also add that this is in a sub rule script that gets called after the main Setup.rul.

Thanks in advance.

+4
source share
1 answer

If you use InstallShield 11.5 and earlier, you can initialize any variables in the OnBegin method.

Using InstallShield 12 and later, use MsiSetProperty and MsiGetProperty(hMSI, "MyVariable", szSupportDir, nLen) to set and select global variables, because when the basic MSI installation performs a custom InstallScript action, the compiled InstallScript is loaded before the action is invoked and unloaded after completion of the action.

+6
source

Source: https://habr.com/ru/post/1307578/


All Articles