PDA

View Full Version : Dynamic Function Calling



Christopher Painter
06-12-2006, 05:36 PM
Is it possible to dynamically call installscript functions at runtime?

For example:

szFunction = CustomGetFunctionFromSomeDataSource();
CustomCallISFunction( szFunction );

The only way I can thing to do it is with a hard coded case statement or by calling MsiDoAction and splitting all of the functions out into their own CA's. I'd like to avoid both of these scenarios for maintenance and performance reasons.

RobertDickau
06-13-2006, 09:03 AM
I don't think there's any notion of function pointers in InstallScript (I'll be glad if someone demonstrates otherwise), so MsiDoAction or switch are probably what you'll need.

Zweitze
06-13-2006, 03:19 PM
I don't MsiDoAction is a valid solution. I tested this in IS 11, where it didn't work - http://community.installshield.com/showthread.php?t=156786

Christopher Painter
06-13-2006, 03:46 PM
It works fine in IS12. I havn't tried 11.