When using GetFileVersion on a windows 10 system and using Kixtart version 4.66 or 4.67 I get a false file version back. Below is a script I am using.
? '------ Entering Testscript.kix ------'
;************************************************************************
$RC=setoption("WOW64AlternateRegView","On")
$RC=setoption("Wow64FileRedirection","on")
$RC=setoption("WrapATEOL","on")
$RC=setoption("NoVarsinStrings","on")
$RC=setoption("NoMacrosinstrings","on")
?
? "Kix Version - " @kix
? "Windows OS - " @producttype + " " + iif(@onwow64,"64bit","32bit")
$SCRIPTPATH = "\\mycomputer123\C$\Users\me123\Desktop\myscript\Scripts"
;************************************************************************
;***** Call Functions.kix to load all custom functions *****
;************************************************************************
Call $SCRIPTPATH + "\Functions.kix"
;************************************************************************
;***** Windows 10 test *****
;************************************************************************
$GoodVersionNum = "10.0.10586.17"
$FilePath = "%windir%\System32\Mssign32.dll"
;************************************************************************
$FileVersion = GetFileVersion($FilePath, "BinFileVersion")
;************************************************************************
If $FileVersion <> "" AND instr($FileVersion_C, "Good")
$Patch = "Good"
Else
$Patch = "Bad"
EndIf
;************************************************************************
$Patch_T1 = " Patch 1 Installed version: " + $FileVersion + " Required version is: " + $GoodVersionNum
?
? "File path we are looking into"
? $FilePath
?
? "File's version that Kixtart can see"
? $FileVersion
?
? "File version and what it needs to be at."
? $Patch_T1
?
;************************************************************************
? '------ End of Testscript.kix ------'
?
This is what it returns after running the script
------ Entering Testscript.kix ------
Kix Version - 4.67
Windows OS - Windows 10 Enterprise 64bit
File path we are looking into
C:windowsSystem32Mssign32.dll
Files version that Kixtart can see
6.2.10586.17
File version and what it needs to be at.
Patch 1 Installed version: 6.2.10586.17 Required version is: 10.0.10586.17
------ End of Testscript.kix ------
* there are backslashes in the file path
The real file version for this .dll file is 10.0.10586.17