View Full Version : VBScript - How to make IS act on the value returned from a function

03-12-2012, 09:13 AM
I have a great vbscript. It locates the version number in the registry on target system. Takes only the first digit and evaluates it to see it it is Less Than 3

If less than three my function returns TRUE, Else the function returns FALSE

My question here is, How to get InstallShield to retrieve and act on either the TRUE (or) FALSE Value?

I have the Custom Action window open. and here are my settings...

[Source Location] = "Browse File System"
[File Name] = "this\is\a\long\local\path\to\my\vbScript\file"
[Function Name] = "VersionLessThanThreeExist"
[Wait for Action] = Yes
[Ignore Exit Code] = No
[Comments] = "Just my description on that I'm trying to do here"
[Condition] = "No Condition"

I have no [Condition] here because I can't find a way to tell it to "Halt Execution if the return value of the function is FALSE......

Under [Condition] i am limited to selection places to search like paths and keys or values of .ini files

Please tell me how to test and act on the TRUE or FALSE return of my function.


Best Regards,

[EDIT: I have changed the .vbs to return a 1 if true and 0 if false. How can i tell installshield to halt install if function returns 0? Ir I could reverse these exit codes if necessary. can you help please?]

[EDIT: OK, I have figured out how to stop the installation and that is by returning 3 from the function. Now, where do I place a message to be displayed as a result of the exit action? I tried a msgbox("some message") but this is displayed three time in a row? Can you advise please what do do to finish up this??? I got the installer to stop installation with a vbscript function returning 3 but now there needs to be a message display explaining the action.... Thanks bunches if you can help me.]