How to set a variable install folder? - Advanced Installer Community
JasonZhang
Posts: 4
Joined: Fri Oct 29, 2021 4:13 am

How to set a variable install folder?

Hi,

I need to create a new installer which install folder path depends on a registry value.

How to get the registry value and set it to the install path?

Many thanks.
Jason
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: How to set a variable install folder?

Hello Jason and welcome to our forums,

You can achieve this using a registry search and then set the APPDIR to the value returned from the search.

1. Go to the "Registry" page and create a registry search location.

For more details you can see our How to create a Registry Search article.

2. From the "Custom Actions" page you can add a "Set installer property" custom action scheduled after "Searches" action group in the Wizard Dialogs Stage.

set property.png
set property.png (178.7 KiB) Viewed 2600 times

If you do not want to allow the user to change the installation path then you can remove the "FolderDlg" dialog from the "Dialogs" page.

Hope this helps! Please let me know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DanielleFredericksn
Posts: 1
Joined: Mon Jun 06, 2022 10:22 am

Re: How to set a variable install folder?

Last edited by DanielleFredericksn on Fri Jul 08, 2022 9:20 am, edited 2 times in total.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: How to set a variable install folder?

Hello Danielle and welcome to our forums,

In order to achieve that, you can use our "Environment Variable" page.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”