PDA

View Full Version : Assign value to global property within lua script


psulek
05-13-2008, 02:27 AM
I have global static property named CurrentOS defined in Project->Settings->Properties.

Now i have custom action->run lua script and the script body is:
CurrentOS = System.GetOSName();
Dialog.Message("Lua script", CurrentOS);

When i run builded setup, it shows me dialog correct os name, thats good, but.
When i try to use global static property CurrentOS in dialog text label as
Current OS: [CurrentOS], this property does not contains any value.

Timing setting of run lua script is:
- InstallUISequence
- Before WelcomeDlg

Simple question, how do update global property within lua script?

psulek
05-13-2008, 03:36 AM
I found solution myself :)

Here is:
CurrentOS = System.GetOSName();
result1 = MSI.SetProperty(_hInstall, "CurrentOS", CurrentOS);

calling MSI.SetProperty will set value to global property, which can be used in controls in dialogs.