Installer that update only if minimum version present
Installer that update only if minimum version present
I'm looking for a new installer because my favorite one (Astrum) is officially out of business. One thing that I liked about Astrum is that it allowed me to build an updater that would update the user's installation only if their existing installation had a version number greater or equal to a given number. Can I do this with Actual Installer?
Re: Installer that update only if minimum version present
Actual Installer allows you to create update programs. But there is no specific feature to check an existing installation version.
However there is a solution: by using Actual Installer variables and commands.
First, you need to read a version number of currently installed application (whis is stored in Registry).
To do so, go to the System \ Variables page and add:
*My Cool App* - here should be your application name (you can use a variable <AppName>) or ProductID (e.g. {107F5F2E-A974-75C9-2237-5F98A87E8BB0}).
It depends on the installation program you used for earlier installations.
OK, now a variable <CurVer> containts a version number, e.g. 5.0
Next, we need to comapre this version number with the number specified on the General \ Information page of the update program.
Go to the System \ Commands page and add:
GEQ - greater than or equal
<SetupTempDir>\msg.bat - this batch file will be executed if the result of comparing is true. It just shows some message.
Example of the msg.bat file:
However there is a solution: by using Actual Installer variables and commands.
First, you need to read a version number of currently installed application (whis is stored in Registry).
To do so, go to the System \ Variables page and add:
Code: Select all
Variable Name: <CurVer>
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*My Cool App*
Value Name: DisplayVersion
Type Value: STRING
Default Value: <AppVersion>
It depends on the installation program you used for earlier installations.
OK, now a variable <CurVer> containts a version number, e.g. 5.0
Next, we need to comapre this version number with the number specified on the General \ Information page of the update program.
Go to the System \ Commands page and add:
Code: Select all
Command: <SystemDir>\cmd.exe
Parameters: /C IF /I "<CurVer>" GEQ "<AppVersion>" ("<SetupTempDir>\msg.bat")
Launch on OS: All
Show: Normal
Launch: Before Installation
Wait: Yes
GEQ - greater than or equal
<SetupTempDir>\msg.bat - this batch file will be executed if the result of comparing is true. It just shows some message.
Example of the msg.bat file:
Code: Select all
@ECHO off
ECHO The latest version is already installed.
ECHO It is strongly recommended to not continue with the installation!
PAUSE
Re: Installer that update only if minimum version present
New version 5.3 of Actual Installer has a version comparing feature.
So if a user is trying to install or update the application that is already has a version number greater or equal to version about to be installed, setup program will warning the user.
So if a user is trying to install or update the application that is already has a version number greater or equal to version about to be installed, setup program will warning the user.