Skipping a dialog screen if a condition is true - Advanced Installer Community
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Skipping a dialog screen if a condition is true

Hi,
Can anyone point me to a tutorial or "how to" document on what is required so that if a property has a value (a property that I am reading from an INI file) then one of my custom dialogs (the "Registration" dialog) should not be seen by the user?

In other words, for first time installers, I want to capture some basic info about the user (and all 3 fields I have on my Reg dialog are mandatory).
For future upgrade installations I don't want to them to have to see or re-enter that registration data, and of course I don't want to overwrite that registration data with blanks, assuming that the Reg dialog is hidden.

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Skipping a dialog screen if a condition is true

Hi,

In order to achieve this, you can use the "Show only if..." option as described in the Display a dialog based on a checkbox state tutorial.

To preserve the data in your INI file, you can create INI searches to retrieve that data using the same properties as those that write the data in the INI file.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Ok, great thanks, I think I have it working
I did a Show If condition that was "NOT EDIT_1_USER_ID" and so when the INI file has a value for that property it will hide this dialog for me and when the INI file does not have that property (or the INI file is not present) then this dialog will show.

It seems (with initial testing) that I don't need to do anything special to preserve those existing INI file values in the case when they exist and the dialog is hidden. It looks like those values are preserved in this scenario, which is great news!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Skipping a dialog screen if a condition is true

You're welcome. I'm glad you got this working.

Just let me know if any other problem appears.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Hi,
Further testing reveals that I must have introduced a different problem.

Now, for the scenario where no prior installation exists the problem is when the user enters data in the Registration Dialog it is now no longer letting them proceed with the "Next > " button. I did have this working until I started to try to skip this dialog if the data was already pre-filled (as is necessary for the case when the user is installing an updated version of our system).

My guess is that the problem is with my Published Events attached to the "Next>" button. But I don't quite follow the logic that is expected in this area.

I have 3 Simple Edit fields on my Reg. dialog that are as follows:
Full Name field:
Name= FULL_NAME
Property Name= EDIT_1_FULL_NAME

Company Name field:
Name= COMPANY_NAME
Property Name= EDIT_1_COMPANY_NAME

Overture User ID field:
Name= OVERTURE_USER_ID
Property Name= EDIT_1_OVERTURE_USER_ID

And, I have two events listed, and they are as follows. Can you help me resolve why an initial installation of my application will not let the user proceed passed this dialog, even if they have entered in all of the required data?
Attachments
PublishedEvents.png
PublishedEvents.png (6.83 KiB) Viewed 14839 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Skipping a dialog screen if a condition is true

Hi,

In the image that you attached, it seems that the "Next" button will get you to the "VerifyReadyDlg" dialog only if the "Overture User ID" field (NOT EDIT_1_OVERTURE_USER_ID) is empty.

So, if you want to go to the next dialog when that field is not empty, you should remove the "NOT" operator written in the condition.

If the above solution does not work, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Hi,
I have tried to remove the "NOT" from that condition, but there doesn't appear to be a way for me to make such an edit...maybe I have to go into the Table Editor?

When click on the "Edit..." button for the first one of the two events I showed you, I then see an "Edit Control Event" that pops up, but the "show entire condition" checkbox is disabled and all I can seemingly do is add to the existing condition, so I don't see a way for me to be able to remove the word "NOT". (see first screenshot).
Edit Control Event
Edit Control Event
Edit Control Event.png (23.95 KiB) Viewed 14828 times
It seems that it might have been when I used the "Show Only If" that I must have first entered that bad "NOT" condition and so it created (see screen shot 2) my Reg Dlg as a child of that bad condition "NOT EDIT_1_OVERTURE_USER_ID", and if I choose to delete that condition then it deletes my Reg Dlg at the same time; plus I don't see how I can move the Reg Dlg so that it won't be deleted. I'd prefer not to have to recreate the dialog from scratch if at all possible.
Install Sequence
Install Sequence
Install Sequence.png (11.49 KiB) Viewed 14828 times
Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Skipping a dialog screen if a condition is true

Hello,

Please keep in mind that when using our "Show only if..." support to conditionally display a dialog, the used condition (i.e. NOT EDIT_1_OVERTURE_USER_ID) will be added as a condition on all events triggered by any control from your conditioned dialog. Therefore, all events from [Next>] button of your "RegistrationDlg" dialog will be executed only if the "NOT EDIT_1_OVERTURE_USER_ID" condition is true. However, since you set the "EDIT_1_OVERTURE_USER_ID" property right on your "RegistrationDlg" the above condition will be evaluated to false, so your [Next>] events will not be triggered.

In order to avoid this behavior, as a workaround you can use an auxiliary property (e.g AUX_EDIT_1_OVERTURE_USER_ID) which will be associated with your Overture User ID field and edit the spawn dialog condition like this:

Code: Select all

(NOT  EDIT_1_FULL_NAME) OR (NOT EDIT_1_COMPANY_NAM) OR (NOT AUX_EDIT_1_OVERTURE_USER_ID)
Then, on the "Init Events" tab of the next dialog (VerifyReadyDlg) you should add a "Set installer property value" control event which will set the "EDIT_1_OVERTURE_USER_ID" property to the "AUX_EDIT_1_OVERTURE_USER_ID" property value like this:
  • Event: Set installer property value
    Property: [EDIT_1_OVERTURE_USER_ID]
    Argument: [AUX_EDIT_1_OVERTURE_USER_ID]
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Hi Daniel,
I followed your suggested steps, but still no luck. It seems that the Init Event of the SpawnDialog is too late for me to be associating the AUX_EDIT_1_OVERTURE_USER_ID property with my EDIT_1_OVERTURE_USER_ID because in the Reg Dialog when the user clicks "Next>" the AUX_EDIT_1_OVERTURE_USER_ID property is still empty, and therefore the user sees the SpawnDialog: "You must enter ....(all fields)...in order to continue."

This is what I have now for the "Next>" button on the Reg Dialog
Push Button Next Published Events.png
Push Button Next Published Events.png (11.73 KiB) Viewed 14788 times
This is what I have for the Init Events of the VerifyReadyDlg
Verify Ready Dlg Init Events.png
Verify Ready Dlg Init Events.png (4.92 KiB) Viewed 14788 times
Did I do something incorrectly here?

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Skipping a dialog screen if a condition is true

Hello,

Can you please make sure you have edited your Overture User ID control from Reg dialog to use the "AUX_EDIT_1_OVERTURE_USER_ID" property and see if the behavior still persists? If so, can you please send us the .aip (project file) to support at advancedinstaller dot com so we can investigate?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Hello,
Some progress to report (sort of), but still something is not right. I edited our Overture User ID control on the Reg dialog to use the "AUX_EDIT_1_OVERTURE_USER_ID" property and that seems to have helped; I can now click the "Next>" button and proceed to the "Installing...Verifying prerequisites" phase. But now, I am seeing a message for the very first time regarding the Visual C++ 2008 Redistributable.
VC_2008_Redist_Not_Installed.png
VC_2008_Redist_Not_Installed.png (6.49 KiB) Viewed 14691 times
What could have gone wrong that makes this suddenly appear? I didn't change anything else, all I did was change the one Simple Edit control to use the "AUX_EDIT_1_OVERTURE_USER_ID" property instead of the "EDIT_1_OVERTURE_USER_ID" property. I did check the Prereq. tab too to make sure that the items that are checked-on are the ones that I would expect.

Very strange, why would these two things that seems so un-related have had this impact on each other?

I have attached the Verbose Log as well.

Thanks.
Attachments
MSI72eb0.LOG
(130.38 KiB) Downloaded 604 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Skipping a dialog screen if a condition is true

Hello,

This may happen if you aren't using proper install conditions for your prerequisite package. Please take a look on our "Why do I receive the 4154 warning?" faq which explains why this error could appear. So, can you please make sure that you are using proper install conditions for your prerequisite package and see if the behavior still persist?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Hi,
I have now read the FAQ that you linked me too, but it doesn't really help me understand what has changed or why something in this prerequisite area could suddenly appear as a new problem. As far as I know the test machine has not changed at all. Why would my AUX property changes that you suggested have impacted the pre-reqs?

Here is a screen shot of the VC++ 2008 > Prerequisites > Install Conditions tab:
VC_2008_Redist_Install_Conditions.png
VC_2008_Redist_Install_Conditions.png (34.93 KiB) Viewed 14655 times
My test machine is Win7 x64.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Skipping a dialog screen if a condition is true

Hello,

I don't think this is related with your "AUX_EDIT_1_OVERTURE_USER_ID" property. This related error appear when the prerequisite installation fails or when the prerequisite installation succeeds, but after installation the search added in the "Install Conditions" tab of your prerequisite still fails. Please keep in mind that you should use a search which will fail when the prerequisite package isn't installed and will succeed when the prerequisite is installed.

Let us know if this helped, otherwise please send us the .aip (project file) to support at advancedinstaller dot com so we can investigate it.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Skipping a dialog screen if a condition is true

Hi,
I have sent the AIP file via email, as you requested.

Thanks.

Return to “Common Problems”