Read registry key to set folder - 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!

JonathanWest
Posts: 2
Joined: Tue Aug 25, 2009 11:19 am

Read registry key to set folder

I'm trying to create an installer for an add-in to another program.

The other program has various settings as to where different files are stored, and (just to make life interesting) the user has the ability to change these settings. The settings get stored within the HKCU hive in the registry. I know the precise key name, and the folder to use if the key is absent because the user has not customised the setting.

So I believe what I'm looking for is:

1. The ability to create a property based on a specific registry value
2. For the property to be assigned a default value (a specific subfolder within the user's Application Data folder) if the key is absent.
3. For files to copied to that location.

Is this possible?

many thanks
Jonathan West
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Read registry key to set folder

Hello,

Welcome to Advanced Installer Forums. All three features you require are supported by Advanced Installer. Here is how you can achieve your goal:
1. The ability to create a property based on a specific registry value
Using the Search Page you can create a registry search. The result of the search will be stored in a property which you can later use.
2. For the property to be assigned a default value (a specific subfolder within the user's Application Data folder) if the key is absent.
The Property Set with Formatted custom action is responsible for making assignations depending on a condition. Place this custom action after the AppSearch Standard Action. Let us assume your property is MYPROP. The condition placed on the "Property Set with Formatted" custom action should look something like "NOT MYPROP".
3. For files to copied to that location.
You can use a Property Based Folder to achieve this. Our guide on "Installing in a custom folder" should be of help to you.

For a better understanding on how Advanced Installer works, we highly recommend reading our comprehensive Tutorials, How To's and Q&As".

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”