Pass install directory to other install programs - Advanced Installer Community

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!

BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Pass install directory to other install programs

I am a newbie.

I would like to have a master install program which installs a set of sub install programs. The master program display a series of buttons, the user clicks on a button which calls DoAction to install a sub program, the user can click on as many buttons as he likes. The master program gets the root directory at the start. The sub programs are installed off the root. My problem is how to tell the sub program where to install. All the installs are on Windows.

These are the procedures which I have tried to tell the sub program where to install, without success.
1. Master program sets an environment variable, XXX_HOME, the “Application Folder” for the sub program looks like [%XXX_HOME]\NewSub. The problem is the environment variable is not set until AFTER the master program is finished. When the sub program starts XXX_HOME is not set.

2. Set the “Application Folder” for the sub program to the current directory or working directory. This is actually the method I like best. “Application Folder” for the sub program looks like [%CD]\NewSub which did not work. I also tried [.]\NewSub and .\NewSub

3. Use the registry to set the root directory. The registry is updated correctly. But I don’t know what goes in “Application Folder”. I have tried
HKEY_LOCAL_MACHINE\SOFTWARE\Informatix Inc.\Rapid Install Selection\New_Key\NewSub
and
[HKEY_LOCAL_MACHINE\SOFTWARE\Informatix Inc.\Rapid Install Selection]\New_Key\NewSub
And
[%HKEY_LOCAL_MACHINE\SOFTWARE\Informatix Inc.\Rapid Install Selection]\New_Key\NewSub


How do I can pass the root directory to the sub programs?


Thanks,
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I recommend using this approach:
- the data files of the sub-installs will be added in the "Files and Folders" page in distinct subfolders of the "Application Folder" (the folder of the main installation)
- in the "Organization" page you create a distinct Feature for each sub-folder and move all the Components attached to the data files in the sub-folder under this Feature.
- in the "Dialogs" page you can add the "SetupTypeDlg" dialog so the user can choose which features will be installed (each feature represents a sub-installation).

You can read more about the "Organization" page and about features and components here:
http://www.advancedinstaller.com/user-g ... ation.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Thanks Cosmin,

I figured out how to pass the registry to the sub programs, through a search of the registry. I had never used search before, it is very nice.

I’m happy with the master program installing sub programs. The sub programs are large, if everything was in single install program it would be very large, complex and hard to maintain, this gives me separate units to work on and test. I will test the features and see what I think. Is there something that I’m not aware of, that would make the features approach better?

Thanks
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm not sure what exactly is the configuration of your project, but if you don't have the sub-programs included in the main installation package then the method with the features is not very efficient.

If your approach is what you need then you should use it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”