palelocust
Posts: 7
Joined: Sun Nov 23, 2008 7:51 pm

A more recent version....

Here's my setup:

C# Application
Built using CruiseControl.Net
The exe's file and assembly version are incremented with each succesful build (Currently 4.0.190.0)
Updater.exe is installed with the application and points to an internal webserver

When a build is kicked off, the exe gets built first. The version is then set in the aip file through:

Code: Select all

"C:\Program Files\Caphyon\Advanced Installer 6.4\AdvancedInstaller.com" /edit "C:\AutomatedBuilds\MsiBuildFile\QQ_Advanced_Installer_Trial.aip" /SetVersion -fromFile "C:\AutomatedBuilds\QuickQuote\bin\Release\QuickQuote.exe" 
(I've verified that the version changed from 4.0.189.0 to 4.0.190.0 by opening the aip file before and after the build.)

I then update the update text file. It looks like this:

Code: Select all

;aiu;
[Update]
Name=QuickQuote
URL=http://cx-dev/QuickQuote.exe
Size=79668882
FilePath=[APPDIR]QuickQuote.exe
Version=4.0.190.0
AutoCloseApplication=[APPDIR]QuickQuote.exe|;Quick
I right-click on cx-dev/QuickQuote.exe and check the properties.
FileVersion: 4.0.190.0
Product Version: 4.0.190.0

I now go to my test box and check, it has an installed exe versioned 4.0.187.0

I launch my application and it goes out to check for an update. It sees that 4.0.190 is the newest version and prompts me to download it.
It download the installer and launches the installer. I'm then presented with the windows installer message "A more recent version of QuickQuote has already been installed."

Does anyone know why this is happening? The file that is installed is 4.0.187.0 the file being downloaded is 4.0.190.0 shouldn't that indicate a greater version?

Thanks
palelocust
Posts: 7
Joined: Sun Nov 23, 2008 7:51 pm

Re: A more recent version....

The one place I didn't look at was the download directory.

For some reason the file sitting in C:\Documents and Settings\administrator.INSULNET\Application Data\Conductix\QuickQuote\updates\Update was 4.0.184.0

Does this not get overwritten?
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: A more recent version....

I think that you may well be getting caught out by something which used to catch me out as well.

Two things. Firstly AI does not handle four digit version numbres (ie 1.2.3.1) stick to a maximum of three.

Secondly two digits (ie 1.2 87) will oft be rounded so that would look like 1.2.9

Basically you need to think through your incremental numbering so that you do not end up with a version on a machine that will not be updated as you expect because the old and new versions 'appear' to be the same.

Dom
palelocust
Posts: 7
Joined: Sun Nov 23, 2008 7:51 pm

Re: A more recent version....

Thanks for your help, but the source of my problem was actually the file that was being downloaded from the server was not ever writing over the old one.

On another post I found the updater.exe /m clean
or something along those lines. I now can clean out the download directory after I'm done updating.

It's windows installer that doesn't notice 4 digits, and as a result I'm only using 3. I don't think it does any rounding either, because .Net's v2.0 version was actually 2.0.50727 and it didn't get rounded.

Anyway, thanks for the help, the problem is now solved.

Return to “Common Problems”