Yes, that was the problem, although when i tried your line it gave me an out of bounds error.
So instead i'm doing this: $FileNameCheck = ExpandEnvironmentVars($array[0])
I had read the help, and one of the Expressions had the %USERNAME% field in it, so i thought you could just use that without anything else.
Thanks.
So here's the updated code (smaller than the original too).
Code:
Function TempArray($KBNumber)
Break on
$arrayfilehandle = FreeFileHandle()
$filename = "$ScriptDir\UpdateFileList\" + $KBNumber + ".csv"
If Open($arrayfilehandle,$filename) = 0
$line = ReadLine($arrayfilehandle)
While @error = 0
$array = Split($line,",")
$FileNameCheck = ExpandEnvironmentVars($array[0])
$FileVerCheck = $array[1]
If GetFileVersion($FileNameCheck,"FileVersion") < $FileVerCheck
$NeedUpdate = 'Y'
Exit
EndIf
$line = ReadLine($arrayfilehandle)
Loop
$= Close($arrayfilehandle)
EndIf
$TempArray = $NeedUpdate
EndFunction