We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

campster
Posts: 15
Joined: Thu Jun 14, 2007 7:54 pm

Select Merge Module from custom dialog

I have three versions of files that can be installed based on the selection of the appropriate radio button on a custom dialog. How do I use this information to only load the merge module associated to the selected radio button? I thought that I could use the Custom Actions to do this but I can't figure out how. ANy suggestions?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
How do I use this information to only load the merge module associated to the selected radio button?
This cannot be done since the merge modules are merged at build time.

What you can do is to condition the installation of a component depending on the state of a check box (or radio button). See following forum thread for a similar approach:
http://www.advancedinstaller.com/forums ... php?t=2584

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
campster
Posts: 15
Joined: Thu Jun 14, 2007 7:54 pm

Here's why I think that I need to use a Merge Module. Let's say that I have four folders: common, ver1, ver2, ver3. As the name implies, the common folder has files that are common to all versions and will always be installed.

The common directory and the ver directories have the same structure and the ver folders have files that have the same name but have different content. In AI, I cannot place two files with the same name in the application folder. How would I place the files from my different versions into AI so that the file with the same name can be loaded based on the user selection?

Mydir
- common file1
- common file2
- ver1 file3
- ver2 file3
- ver3 file3

For example, I cannot do what I have shown for the MyDir directory because file3 has the same name but will be loaded from a different locaion based on the user input.
campster
Posts: 15
Joined: Thu Jun 14, 2007 7:54 pm

I've decided to take another path that looks like it is going to work but I have a few problems. My new idea is to have three MSI files that contain the unique files and one MSI that contains all of the common files and that also will call/load one of the other MSI files based on user input. I'm using radio buttons on a custom dialog and custom actions to select the proper MSI. Here are the problems that I'm encountering:

Custom Action Execution Condition not recognized:
In my custom dialog I have a radio button group with a property named MSVERSION_PROP and three radio buttons with the values:VS60,VS02 and VS03.

I used the Custom Action Wizard to launch the unique MSI files(i'll refer to the first- VS60). If I run the main MSI with the Execution Condition set to "Not Installed", the VS60 MSI runs and all files go where I would expect. However, if I set the Execution Condition to "(MSVERSION_PROP =VS60) AND (Not Installed)" the VS60 MSI does not run. I even tried "(MSVERSION_PROP ~=VS60) AND (Not Installed)" and it did not work either.

I've placed labels on the custom dialog as well as the FolderDlg to monitor the MSVERSION_PROP property and they are are updating as I would expect. I also created an ScrpitInLine custom action just before the VS60 custom action to launch a message box with the MSVERSION_PROP in it and it has the correct value.

Do I have the Custom action in the wrong location? Why does it not recognize the conditional statement: (MSVERSION_PROP =VS60) AND (Not Installed)?

Uninstall causes an error:
The Custom Action Wizard created an uninstall action to uninstall the VS60 Msi when the main MSI is uninstalled. If I uninstall the program when the above conditional statement is "(Not Installed)" there is no problem. This means that the VS60 MSI was installed and therefore there was no problem unistalling it.

If, however, the VS60 MSI does not install and I try to uninstall I get an error that the unistall was not successful and I have to sift through the registry deleting keys to get the install progam to work again.

How can I tell the installer not the uninstall the VS60 MSI if it was not installed?

Install Paths do not match:
If I set the default install paths in all MSIs to, Let's say, C:\temp and then accept this default value when I run the install then everything works fine. But if I choose a different path during the installation process, the main MSI files get loaded in the new directory and the files from the other MSIs get loaded into the default path.

Is there anyway to make the install path VS60 MSI match the path of the main MSI if something other thatn the defalut is chosen?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Using nested installation is not recommended because this feature was deprecated by Microsoft. Read more about this here:
http://msdn2.microsoft.com/en-us/library/aa368010.aspx
The common directory and the ver directories have the same structure and the ver folders have files that have the same name but have different content. In AI, I cannot place two files with the same name in the application folder.
In the "Files and Folders" page create a property based folder for each VS version (define the properties first in the "Install Parameters" page).

In the "Custom Actions" page create two "Property Set With Formatted" custom actions under "InstallUISequence->CostInitialize" with following options:

1. Property Name: VS1
Formatted Text: [APPDIR]

2. Property Name: VS2
Formatted Text: [APPDIR]

Drag this custom action (while shift key is pressed) to "InstallExecuteSequence->CostInitialize" action.

You can organize the files for each VS version in a specific feature and condition the installation of this feature with the user selection. On how to conditionally install a feature please see following forum thread:
http://www.advancedinstaller.com/forums ... l+features

Hope this helps.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Last edited by gigi on Fri Jun 29, 2007 7:46 am, edited 1 time in total.
campster
Posts: 15
Joined: Thu Jun 14, 2007 7:54 pm

Thanks gigi

That got me a little closer but here's the new problem.

TO ensure that the install disk is alwasy current I syncronize my VS60,VS02 and VS03 folders with corresponding folders on my local PC. This way I only have one folder for each version on the "files and folders" page. Each of these folders contain 6 sub-folders and numerous files that get imported when I build my project. The problem is that the imported files/folders do not go into the correct feature in the organization page. All of the new files get placed in the main feature and therefore gets loaded everytime.

Is there a way to use the synchronize feature and have the file for VS60 go into the VS60 feature?
campster
Posts: 15
Joined: Thu Jun 14, 2007 7:54 pm

In the "Files and Folders" page create a property based folder for each VS version (define the properties first in the "Install Parameters" page).
I thought that things were working but after playing around some I'm now getting an error:

Could not access network location APPDIR.

APPDIR is the value taht I used for my property on the Install Parameters page. The error occurs after the installer displays the Wleome dialog with the "Computing space requirements" message.

What shoud I use for Property values?
Drag this custom action (while shift key is pressed) to "InstallExecuteSequence->CostInitialize" action.
What is the purpose of this step? Unless I'mdoing something wrong, I'm placing the Custom Action in twice. Once in "InstallUISequence->CostInitialize" and again in "InstallExecuteSequence->CostInitialize"

EDIT:

Here's a little more info. Ijust rebuit the project fromthe ground up it seemed like the problem went away. However, the project was installing files from all three version. I realized that I did not define an execution condition for my Custom Actions. Once I added the expression " "MSVERSION_PROP = "VS60"", the error came back.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
All of the new files get placed in the main feature and therefore gets loaded everytime.
When you add new files in the "Files and Folders" page they are all added to the current feature. You can change the current feature in the "Feature" combobox from "Files and Folders" toolbar.
I thought that things were working but after playing around some I'm now getting an error:

Could not access network location APPDIR.
You need to create a custom action for each folder defined in the "Files and Folders" page. For example you have a folder named VS60. In the "Custom Actions" page create a "Property Set With Formatted" custom action under "InstallUISequence->CostInitialize" and use Property Name: VS60 and Formatted Text: [APPDIR]. Drag This custom action (while shift key is pressed) to "InstallExecuteSequence->CostInitialize" action.

Do this for all folders: VS02, VS03, etc.
Once I added the expression " "MSVERSION_PROP = "VS60"", the error came back.
Do not condition the execution of those custom actions. Those custom actions need to be executed always.

Now you have one feature for each VS version. In order to conditionally install those features depending on the user selection see following form thread:
http://www.advancedinstaller.com/forums ... =4863#4863

Hope this helps.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
campster
Posts: 15
Joined: Thu Jun 14, 2007 7:54 pm

I actually found the link that you provided last night and got the user interface working to properly select the files. I'll look at your suggestions today.

Thanks

Return to “Common Problems”