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
- :
- conditional execution
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
‎Apr 16, 2008
10:07 AM
conditional execution
Hi
I need to ask the user if they wish to proceed if an environment variable is not set.
The installer should check if the environment variable exists (silently) and if it does not, a dialog window should present a message asking the user if they want to continue.
I know it sounds simple but I have had great difficulty doing this. Any help would be much appreciated.
Best Regards,
Kevin
I need to ask the user if they wish to proceed if an environment variable is not set.
The installer should check if the environment variable exists (silently) and if it does not, a dialog window should present a message asking the user if they want to continue.
I know it sounds simple but I have had great difficulty doing this. Any help would be much appreciated.
Best Regards,
Kevin
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2008
10:48 AM
I'm sure there is a few ways, but what I've done is create a new dialog with the message you wish to present, create it in the appropriate frame: like Cancel.
I take it you know how to check for the ENV Var, so in your Events view, check for the existence of the var in onBegin event.
so you do something like:
Then - put your dialog in the sequence and set a stringComparison condition;
Compare Text = $V(SHOWDIALOG)
Source = true
EDIT: That is set the Condition property of the Dialog to show using the stringComparison condition.
Regards,
Tom
I take it you know how to check for the ENV Var, so in your Events view, check for the existence of the var in onBegin event.
so you do something like:
String envVar = arg0.resolveString("$E(ENV_VAR)");
if (envVar.equalsIgnoreCase("null")){
// ceate a flag variable to show the dialog
arg0.getServices().getISDatabase().setVariableValue("SHOWDIALOG","true");
}else{
// verify variable is what you expect
~
~
arg0.getServices().getISDatabase().setVariableValue("SHOWDIALOG","false");
}
Then - put your dialog in the sequence and set a stringComparison condition;
Compare Text = $V(SHOWDIALOG)
Source = true
EDIT: That is set the Condition property of the Dialog to show using the stringComparison condition.
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2008
11:14 AM
Hey Tom. Thanks for the reply.
I think I understand what you are telling me but I am unsure where I am to put the string comparison.
This is what I think you are saying. In the event view I check if the environmental variable is present. I then set a value in the IS database to true or false. I then test the value in the database to determine if the dialog will be shown or not. I am unsure where to call the string comparison condition.
Thanks again,
Kevin
EDIT:
Nevermind. I understand now. Thanks.
I think I understand what you are telling me but I am unsure where I am to put the string comparison.
This is what I think you are saying. In the event view I check if the environmental variable is present. I then set a value in the IS database to true or false. I then test the value in the database to determine if the dialog will be shown or not. I am unsure where to call the string comparison condition.
Thanks again,
Kevin
EDIT:
Nevermind. I understand now. Thanks.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)