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!

aamirgm
Posts: 3
Joined: Mon Sep 14, 2009 9:40 am

Use existing license file from client machine in new version

Hi ,
I developed a product which uses Advance Installer.

Advances Installer creates an MSI package which contains a default license (License #1). During the installation another license file (License #2) stored in the same folder as the MSI and setup package is used and replaces the default license file (License #1). Therefore License #2, is used to install the application and then is dropped into the application folder (i.e. C:\ProgramFiles\... . ). The default license (License #1) is never used. This has worked fine so far.

I have developed a new version of the software (v2), designed to replace the old version (v1) and also be installed on new machines. The new software (v2) needs to use the License #2 file if it exists from a previous installation. Therefore, a prerequisite of the installer is to find the License #2 file from 'C:\ProgramFiles\... . ' folder and move this license into the same folder as our MSI and setup folder. This will enable the application setup to run as normal.

Could anyone please offer me any advice on how to proceed or a better way of doing this?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Use existing license file from client machine in new version

Hello,

You can achieve this by taking the following steps:
- on the Custom Actions page make the AppSearch Standard Action visible through the "Show Standard Action" context menu
- add a new "Launch File or Open URL" custom action and set its "Command Line" field to:

Code: Select all

cmd /c copy "[MY_PROP]" "[APPDIR]"
where [MY_PROP] is the search result property from the search for the installed license. This will effectively copy the license to your application's install directory. You can replace copy with move if needed. On it you should place a condition resembling this:

Code: Select all

MY_PROP AND NOT (REMOVE = "ALL")
changing it as needed.

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

Return to “Common Problems”