PDA

View Full Version : Global variable issue with entry-point function and script event handler



MiltonNet
06-27-2007, 08:16 AM
I have installssript with entry-point function( called from custom action ) and script event handler. It also have a global variable which get set in the event handler, say OnFirstUIBefore. The same global variable is used in the expression in the entry-point function which is attached to a custom action. This Custom action get executed way after OnFirstUIBefore event occurs. This means, the value of a global variable which get sets in the OnFirstUIBefore should be visble in the custom action. BUT ITS NOT. The global variable return blank. When I check a global variable in OnEnd event handler, it has same value which was set in OnFirstUIBefore.

So is this issue with Global variable or its by design.

Thanks

RobertDickau
06-27-2007, 09:30 AM
If you're working with an InstallScript MSI project, perhaps see if this addresses what you're seeing (it has to do with how the InstallScript engine is loaded and unloaded at run time): http://support.installshield.com/kb/view.asp?articleid=Q112115#ISMSIglobal.