Hi guys,
I think I’ve found an issue when using the Installshield Action along with some VB script and variables. It seems that any variables used in the “Installshield Action > Project File” section are not being replaced in the VB Script for that action.
Here’s what I’m doing.
1. I have an Installshield Developer action
2. In the “Project File” section, I’ve got this…
P:\Development\HelpMaster Pro %VERSION_MAJOR%.%VERSION_MINOR%\Installation\Installshield\HMPEE Suite.ism
3. In the “Before Action” script for this action I have some VB script that has this code
strFilename = ProjectFile
objInstallShieldProject.OpenProject strFilename, TRUE
4. When this Action and script runs, I get an exception on the second line because the filename cannot be located. When I debug it with VS, I notice that the variables are not replaced.
I can work-around this issue by hard-coding the values where the varibles used to be, so the “Installshield Action > Project File” becomes…
P:\Development\HelpMaster Pro 7.5\Installation\Installshield\HMPEE Suite.ism
The action is successful when it’s done this way.
Hope this helps.
Many thanks,
Rod
Hi Rod
Variable references in properties are not expanded in place, they are expanded at runtime and the expanded value is used when the action executes. The actual property values stay unchanged. To get the expanded values in script you can do this :
strFilename = Action.ExpandExpression(Action.ProjectFile)
objInstallShieldProject.OpenProject strFilename, TRUE
Thanks Vincent,
That worked! I learn something new about FB every time I use it. Never ceases to amaze.
Best regards,
Rod