Issue with components selection based on Installer properties - Advanced Installer Community
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Issue with components selection based on Installer properties

Hi,

I am using AdvancedInstaller (AI) for developing one installer which will install some files, drives service etc.

I have splitted the files to be installed into to features and components. The selection of which features/components to be installed, is based on one settings file(simple txt file) which contain some install code number. Based on the code number some components will be selected and others not. To achieve this, I implemented a VBScript based custom action to read Install code from settings text file and set some Installer Properties based on this read code value. And in Organization view, I set the Install condition based on this Install Property.

I set the sequence for the execution of custom action (to set properties based on read code) before "Searches" in "Wizard Dialog Statge". In custom action, i added a folder browse so that user can select settings file. Now The Browse dialog come before Prepare Dialog and Welcome Dialog, read settings and later in the installaton state, it install components and features correctly based on Installer properties which is set based on install code.

1. The first part of the issue: The browse dialog comes in back gound of Main Installer GUI. Is there anyway to bring Browse dialog to come in the front 0f Main GUI? I am using "Shell.Application" to pop-up browse dialog. I think, to bring a file selection dialog even before Welcome dialog

2. I tried many methods to solve above, But I could not find any solution to this. So I though of Putting a browse button in Folder Selection dialog. Here with this settings file is selected by user, read the settings and set Installer properties, using a custom action. But the components installation is not working as per the condition set based on Installer properties. As per my analysis, I understand, the components selection based on conditions is happening before Prepare dialog and changing installer properties later (after folder selection dialog) does not make any effect. Please let me know whethere my analysis is correct or not. If there any way to resolve this?

3. To resolve above above, I tried another method of adding a new dialog before PrepareDialog and WelcomeDialog(i am under the impression that Installer properties are to be set before PrePareDialog and Welcome dialog to make components selection is initialized correctly based on installer properties). In the New dialog, i put a browse button to select file. I could select file, but up on clicking "OK" in Brose Dialog, I got an error message that "Directory Manager is not Inialized". Please let me know how to resolve the issue>

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

Re: Issue with components selection based on Installer properties

Hello Prasanth,

1. I'm afraid this behavior is controlled by the Windows OS. I'm not aware about how this can be done, but you can try to do a small search about how to always spawn an UI application in the foreground and implement this capability into your custom action.

2. Yes, you are correct.

3. I'm not sure why you get this error. Can you please send us the .aip (project file) to support at advancedinstaller dot com so we can investigate it?

Also, I think that a more adequate approach for your scenario will be to use our "Serial Validation" feature alongside with the "Stock Keeping Units" support. Please take a look on our "Package Serial Validation" page article.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Re: Issue with components selection based on Installer properties

Hi,

Thanks for your reply!

Issue 1: I fixed the issue using a custom action from a dll (instead of from VBScript). In DLL, I used Windows shell API SHBrowseForFolder to pop-up folder browse dialog, also registered a CALL BACK function to it. In the call back i get handle to browse dialog immediately after it is initailized. I set the Windows as foreground window using SetForegroundWindow API.

For the time being this is OK for me.

Thank you very much for your help and support!

Best Regards,
Prasanth
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Issue with components selection based on Installer properties

You're always welcome Prasanth.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Re: Issue with components selection based on Installer properties

Hi,

I would like to ask you one question with regards to our below discussion.

As per my requirements, I added a Browse Dialog before 'WelcomeDlg'. This is because, I need to get one file path and read some settings(as i explained in below threads) before Prepare stage. This may introduce some GUI sequence changes from our already existing installer where the Browse Dialog is appearing after Welcome Dialog.

So to resolve this, I am planning the following:
1. Add a new dialog before PrepareDlg and modify its looks and feel to appear as Welcome screen
2. Delete already existing WelcomeDlg.

I tested above things and Installer seems working fine.

Please let us know whether this type of approach is confirm with Installer stds or Will it cause any issues in future maintenance.

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

Re: Issue with components selection based on Installer properties

Hello Prasanth,

I'm not aware of any setbacks you may encounter using this dialogs configuration. It should be alright.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Re: Issue with components selection based on Installer properties

Hi,

Ok...Thank you for your comments.

I have one more question with regards to License Agreement page (LAP). I want to show LAP after the new dialog (for new WelcomeDialog) which I had added before PrepareDlg. Can we move the existing LAP dialog for this? Or we may create a new dialog and add controls as in existing LAP? Please share your ideas on which would be best approch.

So with the above things done, my final sequence would be as follows:

1. Newly created dialog which imitate Welcome Screen.
2. Newly created dialog/moved existing one for LAP
3. PrepareDlg with Browse Dialog
4. Folder selection dialog.


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

Re: Issue with components selection based on Installer properties

Hello Prasanth,

I think the easiest way will be to just move the existing LAP dialog.

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Re: Issue with components selection based on Installer properties

Hi,

Thank you for your comments!

Yes, I could use the existing Progress Dialog after moving upwards in the GUI chain. Thanks!
Whether this move operation is allowed for WelcomeDlg also? I tried, but it is not moving.

I have below query with regards to one observation which I had in my project:

Now my project has following dialogs as in below sequence:
1. New Welcome Dialog.
2. License Agreement Page
3. PrepareDlg
4. FolderDlg
5. ProgressDlg
6. ExitDialog

I just tried to delete #4 , as I don't need folder selection(predefined path for installation). But it is not getting removed. Please share your comments.

I tried with a sample test project, and I could found that we can't delete any more dialog when the count of pre-defined dialog is four.

Please let let me know your comments.

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

Re: Issue with components selection based on Installer properties

Hello Prasanth,

I'm not sure why this happens. Please send us the .AIP (project file) to support at advancedinstaller dot com so we can investigate its structure.

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Re: Issue with components selection based on Installer properties

Hi Daniel,

Thank you for your reply!

This can be reproduced with sample test installer created with Architecture as project type.

Best regards,
Prasanth
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Issue with components selection based on Installer properties

Hello Prasanth,

I've further tested your scenario and I was able to replicate the behavior. This seems to be an Advanced Installer issue or limitation. Let me forward and check this with our development team and I'll get back to you as soon as I have a clear response.

Until then, as a workaround, you can go to "Custom Actions" page and add a false condition (e.g. 1=2) on the corresponding action in sequence added for the "FolderDlg" dialog.

Also, as a side note, can you please tell us why you don't want to have any dialog between "PrepareDlg" and "ProgressDlg" dialogs. In this way, when your setup is launched, after you click [Next] on your "LAP" dialog the installation will proceed without any confirmation. Is this what you need?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasanth.tech
Posts: 35
Joined: Wed Oct 28, 2015 5:53 am

Re: Issue with components selection based on Installer properties

Hi Daniel,

Thank you for your reply!

The installer which we are trying to migrate (one created with Installshield script) does not have any dialog in between LAP and Progress Dialog. But it has a folder selection pop-up window (BrowseDlg) in between these dialog. In the new installer with AdvancedInstaller, we do not want any changes in GUI sequence with existing installer. That is the reason why we want to remove that dialog.

I appreciate you help and support!

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

Re: Issue with components selection based on Installer properties

You're welcome Prasanth.

Indeed, this seems to be an Advanced Installer limitation. We'll try to add an improvement in the future. Thank you for your suggestions.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”