#115331 - 2004-03-02 10:44 AM
getfileversion not writing to log file
|
AzzerShaw
Seasoned Scripter
  
Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
|
Morning all
Ive wrote this simple check to get file versions from a couple of products but for some reason getfileversion doesnt seem to want to write to the log file? Ive looked around but cant find anything? What am i doing wrong?
Any help would be appreciated,
Regards
Aaron
Code:
Break on
Open (1,"%systemdrive%\Temp\listpc.txt") ReadLine(1) ReadLine(1) ReadLine(1)
Do $CompName=ReadLine(1) $compname = SubStr($compname,1,8) ;$compname = Trim($compname) ?"$compname"
$info = "C_Drive\Infoconn\accmgr\accmgr.exe" $MyExtra = "C_Drive\program files\E!pc\sessions\experian.edp" $ExpIrma = "C_Drive\infoconn\accmgr\IRMAMAIN.XWQ"
If Exist("$CompName\$info")=1 $InfoVer=GetFileVersion("$CompName\$info") WriteProfileString("%systemdrive%\Temp\attachmate.Log","$Compname","16 bit Infoconnect Accessory Manager"," $InfoVer ") EndIf
If Exist("$CompName\$MyExtra")=1 $MyExtVer=GetFileVersion("$CompName\$MyExtra") WriteProfileString("%systemdrive%\Temp\attachmate.Log","$Compname","16 bit IRMA 3270 emulator(Experian) "," $MyExtVer ") EndIf If Exist("$CompName\$ExpIrma")=1 $ExpIrma=GetFileVersion("$CompName\$ExpIrma") WriteProfileString("%systemdrive%\Temp\attachmate.Log","$Compname","32 bit myExtra 3270 emulator (Experian)"," $ExpIrma ") EndIf
Until $CompName = ""
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields
|
|
Top
|
|
|
|
#115341 - 2004-03-03 11:09 AM
Re: getfileversion not writing to log file
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
There's some KiXtart shorthand going on that you may have missed.
This line is creating an array of filenames called $strFile:
Quote:
$strFile = "appevent.evt","secevent.evt","sysevent.evt"
The next line is simply a For..Next structure which runs for each item in the $strFile array:
Quote:
For each $element in $strFile
On each iteration it assigns the next array element to the variable $element.
This means, that on the first pass $element is "appevent.evt", on the second pass it is "secevent.evt" and so-on.
Les is using the loop twice, once to get some info via FSO, and then again to get some info via KiXtart built-ins.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1046 anonymous users online.
|
|
|