GBERT
Posts: 12
Joined: Fri Jul 10, 2009 10:41 am

Multiple Instances and Path

I am playing with the multiple instances feature.
I have added it to one of my setups in minutes, and the first tests are impressing.
The only problem i am having is properly identifying the instances.
If i check the Control Panel | Programs menu i can see the instances and remove them properly, but they do not tell in which path the instance has been installed.
I tried inserting my main APPDIR property value as a comment, but it contains the initial value, not the one setup at runtime and used to install.
Worst again, when i start the setup and one or more instances is present, a list of the instances is displayed, but the path names displayed are based on the initial defaults, and are not reflecting the paths effectively used to install the instances.
How can i have the paths reflecting the ones really used to install the application?

Giorgio
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Multiple Instances and Path

Hello,

Advanced Installer does not directly support adding properties to the comment. Since you wish to add the path to your Application's comment in Control Panel, you will need to edit that specific registry after the installer has finished installing everything. To do that:
- create a new "Launch File or Open URL custom action" under InstallExecuteSequence->Commit
- in the "Command Line" field place this:

Code: Select all

reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" /f /v "Comments" /d "[APPDIR]"
This will set your comment to the path in which your instance is installed.
Worst again, when i start the setup and one or more instances is present, a list of the instances is displayed, but the path names displayed are based on the initial defaults, and are not reflecting the paths effectively used to install the instances.
We could not reproduce this behaviour. In our tests, the paths that were displayed in "Your Application Setup" dialog, under "Install Location" were the actual paths where the instances were installed.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GBERT
Posts: 12
Joined: Fri Jul 10, 2009 10:41 am

Re: Multiple Instances and Path

GabrielBarbu wrote:Hello,
Advanced Installer does not directly support adding properties to the comment. Since you wish to add the path to your Application's comment in Control Panel, you will need to edit that specific registry after the installer has finished installing everything. To do that:
- create a new "Launch File or Open URL custom action" under InstallExecuteSequence->Commit
- in the "Command Line" field place this:

Code: Select all

reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" /f /v "Comments" /d "[APPDIR]"
This will set your comment to the path in which your instance is installed.
This worked flawlessly.
Thank you.
GabrielBarbu wrote:
Worst again, when i start the setup and one or more instances is present, a list of the instances is displayed, but the path names displayed are based on the initial defaults, and are not reflecting the paths effectively used to install the instances.
We could not reproduce this behaviour. In our tests, the paths that were displayed in "Your Application Setup" dialog, under "Install Location" were the actual paths where the instances were installed.
You couldn't reproduce the problem because you are using the value of APPDIR as target path and APPDIR is written as the installation path for multiple instances.
My setup contains several features, and i'm using different properties, but none of them is APPDIR to avoid confusion.
I added a custom action at Commit changing the value of APPDIR and i obtained a proper install path.
I'm adding a new script to change APPDIR, but people should know that only APPDIR will be used to update the instance path.
In any case i obtained all what i needed.
Thank You.
GBERT
Posts: 12
Joined: Fri Jul 10, 2009 10:41 am

Re: Multiple Instances and Path

I have a little suggestion: very long instance install paths are truncated to the right, so the last part of the path is not displayed unless you resize the form.
Having tha path truncated to the middle with ... so that the first and the last part are displayed would be better.
Not a big problem, in any case.

Giorgio
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Multiple Instances and Path

Hi,

We will consider implementing this feature in future versions of Advanced Installer.
Thank you for your suggestion.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GBERT
Posts: 12
Joined: Fri Jul 10, 2009 10:41 am

Re: Multiple Instances and Path

GabrielBarbu wrote: Advanced Installer does not directly support adding properties to the comment. Since you wish to add the path to your Application's comment in Control Panel, you will need to edit that specific registry after the installer has finished installing everything. To do that:
- create a new "Launch File or Open URL custom action" under InstallExecuteSequence->Commit
- in the "Command Line" field place this:

Code: Select all

reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" /f /v "Comments" /d "[APPDIR]"
This will set your comment to the path in which your instance is installed.
like i wrote, this worked flawlessly.
But when i update with a newer version the Comment is changed back to the default in Product Details.
How can i avoid this, changing it with an appropriate Custom Action or not changing it at all?
Thanks
Giorgio
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Multiple Instances and Path

Hi,

You need to have this custom action in every version of your installer, not just the first one.
Otherwise the installer will use the default one defined in Product Details page.

Regards,
Gabriel
Last edited by GabrielBarbu on Fri Jul 31, 2009 9:06 am, edited 1 time in total.
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GBERT
Posts: 12
Joined: Fri Jul 10, 2009 10:41 am

Re: Multiple Instances and Path

GabrielBarbu wrote:Hi,

You need to have this custom action in every version of your installer, not just the first one.
Otherwise the installer will use the default one defined in Product Details page.

Regards,
Gabriel
What do you mean by "version" ?
How can i create the proper custom action for update?

Thanks
Giorgio
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Multiple Instances and Path

Hi,

You should use an automated upgrade to make an update for your application. Make sure you have the custom action in the new version's project and that you are following the versioning rules.

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

Return to “Common Problems”