mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

Updater always thinks there's a new version

I'm trying to set up the updater, and everything is working, except that it always thinks there's an update to take. My updates.txt file has this:

Code: Select all

[MixApp]
...
RegistryKey = HKLM\SOFTWARE\Square Products Corporation\MixApp\CurrentVersion
Version = 0.8.5
The registry key exists, and has the same value.

But, when I run "updater.exe /checknow", it always shows me the update. If I set Version in updates.txt to 0 then I get "Your software is up to date", but this is clearly not going to work in a real production environment.

How can I make the updater only prompt for a download if the version on the server is newer than the version currently installed?

Thanks.

Marc
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Updater always thinks there's a new version

Hi Marc,

I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project) file of the installed package and the updates configuration file to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

Re: Updater always thinks there's a new version

I think I figured out the problem: I had a FilePath setting in the updates.txt file, and this was messing things up. The documentation on this is all very confusing. http://www.advancedinstaller.com/user-g ... mples.html shows a "Common Configuration" which includes FilePath and Version, but it doesn't say how the updater determines the version in this case, since there's no RegistryKey. The docs do say that FilePath and RegistryKey are mutually exclusive, but the failure mode could be improved a lot (printing an error, instead of just silently doing something inscrutable).

I'm guessing that the system was preferring FilePath over RegistryKey, and comparing version against the resource embedded in the exe, but since I don't have one, it was treating it as zero, which is why setting Version to 0 was working before.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Updater always thinks there's a new version

Hi,
The documentation on this is all very confusing. http://www.advancedinstaller.com/user-g ... mples.html shows a "Common Configuration" which includes FilePath and Version, but it doesn't say how the updater determines the version in this case, since there's no RegistryKey.
This is explained in the article for the update properties in the updates configuration project. Please note that the updates configuration file should be created manually only by advanced users.
The docs do say that FilePath and RegistryKey are mutually exclusive, but the failure mode could be improved a lot (printing an error, instead of just silently doing something inscrutable).
If an error would be shown when the criteria is not met, the Updater would always show an error when an update is found. The purpose of the criteria is simple: if it's met the update is installed, if it's not met the update is not installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mhorowitz
Posts: 12
Joined: Sat Jul 26, 2008 7:11 am

Re: Updater always thinks there's a new version

cosmin wrote:Hi,
The docs do say that FilePath and RegistryKey are mutually exclusive, but the failure mode could be improved a lot (printing an error, instead of just silently doing something inscrutable).
If an error would be shown when the criteria is not met, the Updater would always show an error when an update is found. The purpose of the criteria is simple: if it's met the update is installed, if it's not met the update is not installed.
I'm not suggesting a diagnostic be displayed when the criteria are not met. I'm suggesting a diagnostic be displayed when the aiu file has a syntax error, such as providing two mutually exclusive parameters. Even if this was only done when a verbose or debug flag was passed in, it would save a lot of time staring and wondering why things weren't behaving as expected. Since users would never use this flag under normal conditions, it would never get in the way.

Marc
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Updater always thinks there's a new version

Hi Marc,

We will consider adding this improvement in a future version of Advanced Installer. Thank you for your suggestion.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”