cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CChong
Level 11 Flexeran
Level 11 Flexeran

VBScript Question? - InstallShield evaluate & use return val of TRUE (or) FLASE?

hi.
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.

Thanks

Best Regards,
Mark


[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.]
0 Kudos
(2) Replies
Keerthana
Level 8

Hello,

I infer that you have been able to halt an installation if the return value from the function is 3 and now you would like to display an error message using the VB script.

Kindly provide VB script part that implements this functionality which would help us figure out where to place the message box to display the error.
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

Keerthana wrote:
Hello,

I infer that you have been able to halt an installation if the return value from the function is 3 and now you would like to display an error message using the VB script.

Kindly provide VB script part that implements this functionality which would help us figure out where to place the message box to display the error.


Thanks, you just answered my question. The error message for the installation stop is just a message box written within the IF - END IF statement. I thought a "soft" message could be displayed in the user interface of installshield but I guess not. I have no problems displaying message boxes. Thanks.
0 Kudos