XPect Posted September 8, 2004 Share Posted September 8, 2004 I definitely like this app I now trying to get the maximum from it and I'm now stuck with file version testing.My purpose is to check the presence (and the version) of each program. For this, I mainly use the file version check rather than registry keys.The problem I got is that the checking seem to be done only on the 1st digit of the version.With the code below:[Test]selected=0description.0 = File version Testcommand.0 = Some commandfile.0.0 = %programfiles%\Abilon\Abilon.exe?1.0.1.0The result is the same whatever I check version 1.0.1.0 or only 1 (same result with operator ?>) It seem that the check is done only on the 1st digit only.I use version 2.1.10.0, is this a bug or a syntax error ? Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted September 8, 2004 Share Posted September 8, 2004 None of them I think. This could be a problem in file version resource. Please just send my your Abilon.exe so that I can test it.Benjamin Link to comment Share on other sites More sharing options...
XPect Posted September 9, 2004 Author Share Posted September 9, 2004 Abilon to big to be posted here so I join you dirkey where I got the same problem.Here is the script:[Test]selected=0description.0 = Dirkey version Testcommand.0 = Some commandfile.0.0 = %programfiles%\Dirkey2\dirkey.exe?>2.0.2.4018But I think I made a mistake in the way I do the check.The version of the instaled program is 2.0.2.4019 so comparing with 2.0.2.4018, the result is TRUE. In this case, the description should be with the cross line or normal ?I'm a bit confusedOn the tests I've donefile.0.0 = %programfiles%\Dirkey2\dirkey.exe?>2.0.2.4020Line not crossedfile.0.0 = %programfiles%\Dirkey2\dirkey.exe?>2.0.2.4019Line crossedfile.0.0 = %programfiles%\Dirkey2\dirkey.exe?>2.0.2.4018Line crossedSo I don't understand why while comparing with 4019 tha line is crosseddirkey.zip Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted September 9, 2004 Share Posted September 9, 2004 WIHU compares yor new dirkey.exe version (in your case 2.0.2.4019) with the installed one.file.0.0 = %programfiles%\Dirkey2\dirkey.exe?>2.0.2.4019Will compare file version of old dirkey.exe with new dirkey.exe. So WIHU will compare if new version 2.0.2.4019 is greater than old version. Here some comparison results with > operator:Old New Result2.0.2.4018 2.0.2.4019 TRUE2.0.2.4019 2.0.2.4019 FALSE2.0.2.4019 2.0.2.4020 TRUE2.0.2.4020 2.0.2.4019 FALSEThis mean, if versions of both files are same, this item will be striked out. Only if specified version is greater this item will be installed (will not be striked out)It's only an interpretation thing.Benjamin Link to comment Share on other sites More sharing options...
XPect Posted September 9, 2004 Author Share Posted September 9, 2004 That's what I was thinking, I've misunderstud the logic beyong.I will change my settings to reflect this.Thanks again for your help.PS: any chance to have some day the impossibility to check an item if the existing version is the same or newer ? See that after your studdies... Link to comment Share on other sites More sharing options...
XPect Posted September 9, 2004 Author Share Posted September 9, 2004 Sorry but I got another question related to the subject with this exampledescription.2 = Dirkey 2.0acommand.2=*file.2.0 = %ProgramFiles%\Dirkey2\Dirkey.exe?>2.0.2.4019description.2.1 = Testcommand.2.1 = 02-Utils\DirKey\dirkey.msi /Q /NThe sub branch doesn't appear, any reason for this ? Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted September 9, 2004 Share Posted September 9, 2004 Please, just try to find it out by your self next time.You forgot to create a 2.0 sub command here.Benjamin Link to comment Share on other sites More sharing options...
XPect Posted September 10, 2004 Author Share Posted September 10, 2004 Sorry for this on my understanding, the test was a sub command by itself Thanks Link to comment Share on other sites More sharing options...
gbrogers Posted June 14, 2005 Share Posted June 14, 2005 I just started working with this great program and I can't get a few things to work like I think they should.1 is the version checking. It works but for some programs the full version number does not show up. The 2 programs that this happens for so far is Opera and Spysweeper.For Opera it shows version 8.0 when it should say 8.0.7401.0For Spysweeper it shows version 4.0 when it should say 4.0.2.349I am using this code structure in [environment]:spysweeper.version = %programfiles%\Webroot\Spy Sweeper\Spysweeper.exe?versionAny help would be appreciated. Link to comment Share on other sites More sharing options...
XPect Posted June 15, 2005 Author Share Posted June 15, 2005 There is different "version" fields in a file. WIHU only test one of them so sometime the information you want is not available, I got this with a few apps too.Benjamin had this in target a few month ago but it was never implemented.I've partially solve this by testing the file presence, it's not exactly what's needed, but it work. Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted June 15, 2005 Share Posted June 15, 2005 (edited) The problem here is as follows:Each executable file may contain 4 fields of version information, and not all of them are filled with content:1. There are two fields which only store an integer version of the version number (one for product version and one for file version)2. There may be one or two "string version" fields named "ProductVersion" and "FileVersion" which may also contain data but needent be the same.Problem is, what if integer version (which is always) present is different from "string version"?Ok, I added ?productversion and ?fileversion to explicitely select the one which is requested.Limitation: 1.2d for example however will be converted to 1.2.0.0 ... i.e. only integer values are allowed.Benjamin Kalytta Edited June 15, 2005 by BenjaminKalytta Link to comment Share on other sites More sharing options...
XPect Posted June 15, 2005 Author Share Posted June 15, 2005 Great !I'll test that.Thanks Benjamin Link to comment Share on other sites More sharing options...
gbrogers Posted June 15, 2005 Share Posted June 15, 2005 Thanks Benjamin...Your addition works great. That is exactly what I needed. Too bad opera reverses the number sequence with build number first... 7401.0.1 instead of 1.0.7401.At least now I will know what build is installed.Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now