Antarctica
Posts: 110
Joined: Tue Jul 08, 2014 9:24 am

Uninstall and reinstall - remember last install directory

Hello Advanced Installer team,

Is it possible to remember the last installation directory across uninstall/reinstall?

We have to look at the last install directory whether a certain config file has been kept and parse that one before executing the install and switching install directory.

Kind regards,

Alexander
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Uninstall and reinstall - remember last install directory

Hello Alexander,

Your scenario could be implemented with a "Permanent" registry value that should store the APPDIR value. A search operation should be configured to get this value from registry. The permanent value will not be removed at uninstall and the search operation will retrieve it from the registry.

This is the complete method:

1. go to "Registry" page and create a new String (REG_SZ) registry value named, for example, "Location". In the Data field enter "[APPDIR]" formatted reference
2. go to the component associated with this registry value (select the value in "Registry" page and press F8 key) and set the "Permanent" attribute for it.
3. Go to "Search" page and create a new search. Right click on it and select "Add search location" - "Registry: Configure the search location to find the value from point 1. The type should be configured to "Retrieve the raw value". The result property associated with this search will contain the path of the previous installation of the same product.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”