This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- VBScript Question? - InstallShield evaluate & use return val of TRUE (or) FLASE?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2012
09:59 AM
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.]
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.]
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 13, 2012
08:32 AM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 13, 2012
09:16 AM
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.