drill

custom location

Hi,

I want to install files in a custom location.
I want read in registry the installation directory of the user and then install files in this directory.

How can I do this?

Thanks,

Drill
UdreaMihai
Posts: 90
Joined: Wed Mar 23, 2005 8:13 am

Hello,

In order to solve this problem you must:

1) create a property that will contain the desired path.
2) create a property based folder.

1) Go to the "Search" page -> "New Search" button to create a property (named let's say MYPATH) that will contain the result of a search. Now select this property, use "Add location">"Registry" and select the key that you want.
When the installation will begin MYPATH will contain that registry value that may be your desired path.

2)From the "Files and Folders" page use "New Folder">"Property Based" and select MYPATH. Place your files in that property based folder. These files will be installed in the folder that has the path which is contained in the MYPATH property.

Regards,
Mihai.
Udrea Mihai
Advanced Installer Team
http://www.advancedinstaller.com
Drill

Thanks for your help.

The install dir that I want to search depends of 2 registry keys.
In fact I have to search the value of the "current version" of the product.

SOFTWARE\Mozilla\Mozilla Firefox -> returns the current version

and I want the value of this key :

SOFTWARE\Mozilla\Mozilla Firefox\ + CURRENTVERSION + \Main

Is it possible?

Thanks again!

Drill
UdreaMihai
Posts: 90
Joined: Wed Mar 23, 2005 8:13 am

Hello,

You can include properties to define what value from registry you want to get but these properties must be already defined at the beginning of the installation, you can't use properties that are defined during the installation.

So you must create your own custom action in which you will read the registry and get the path and then you can redirect your TARGETDIR.


Best regards,
Mihai.
Udrea Mihai
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”