Can i get a installation path from register? - 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!

Polaris
Posts: 2
Joined: Sat Jun 04, 2011 6:49 pm

Can i get a installation path from register?

Hello All
Could you answer me about installation path for created installer?
Can I get path of installation folder from Windows regisry?
I want installing my files in the existing program folder.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can i get a installation path from register?

Hello and welcome to the Advanced Installer Forums,

Here is an article that can help you with the registry location. Here is what you can try :
  • add a search for the registry value that holds your old application's path
  • go to Custom Actions page and from the InstallUISequence context menu select Show Standard Action -> Before Initialization -> CostFinalize
  • add the same standard action in the InstallExecuteSequence
  • right click on one of the standard actions and select New Custom Action -> Property Set with Formatted
  • use this custom to set the APPDIR property with your search name
  • the custom action's execution condition should be something like:

    Code: Select all

    YOUR_REGISTRY_SEARCH_NAME
    where YOUR_REGISTRY_SEARCH_NAME is the name of your search in the Search page
  • share the custom action after the other CostFinalize standard action by dragging it and holding the Shift key pressed at the same time
This way the application folder will be set with the path value only if it's found in the registry otherwise it will remain as you set it in the Install Parameters page. The share is to ensure this functionality will occur even when you run the installer in silent mode.

Instead of searching in the registry location, you can also search for your old application's .EXE from the Search page. The search result will also return its path on the target machine.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Polaris
Posts: 2
Joined: Sat Jun 04, 2011 6:49 pm

Re: Can i get a installation path from register?

Many thanks, but for me need a little bit more explanation for "Property set with Formatted"

There are I have a two fields:
-Property Name
-Formatted text

What I have to typing there?

Could you show any easy example?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can i get a installation path from register?

Hello,

Usually, the blue text in any post represents a link to our user guide reference or to another source with more details.

In your case it would be:
Property Name: APPDIR
Formatted text: [YOUR_REGISTRY_SEARCH_NAME]
Because you need the APPDIR property to be assigned with the [YOUR_REGISTRY_SEARCH_NAME] formatted reference.

For more information about formatted references to properties, please follow this link.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”