|
If string1 the string to search IN is smaller than string2 the one to search for, INSTR returns nothing ... not ZERO .. nothing!! Is that supposed to be the case?
In the code below, the version returned by the file is 8.1.0.825 ($version) and is SHORTER than the sting looking into it .. thus returning NOTHING. You would think it would return 0.
----------------------------------
$versionstring = "10.0.2.2000" $version10loc = "c:\Program Files\Symantec Antivirus\vpc32.exe" $version7loc = "v:\vpc32.ex7" $version8loc = "v:\vpc32.ex8"
$Version= getfileversion($version8loc) at (3,1) "version looking for " $versionstring at (4,1) "version is " $version
$offset = instr ($version , $versionstring) at (5,1) "offset is " $offset if $offset <> 0 at (6,1) "strings are the same" else at (6,1) "strings are different" endif
-----------------------------------
|