#163342 - 2006-06-16 05:06 PM
Really easy one...
|
Mstudinski
Fresh Scripter
Registered: 2006-05-19
Posts: 25
|
Basically what I am trying to do is compare a file version from a local machine to a server. If the client version is different than the server version I want it to write to a file. The code below works as planned but I wanted to add the fileversion to the line it writes to the file. This should be easy answered. I know very little about Kix and am just learning.
Thanks!
Matt
Code:
Break On Dim $SO $SO=SetOption('Explicit','On') $SO=SetOption('NoVarsInStrings','On') $SO=SetOption('NoMacrosInStrings','On') DIM $LFile, $SFile, $LVersion, $SVersion, $Msg, $FFile $LFile = "C:\Program Files\Citrix\pn.exe" $LVersion = GetFileVersion($LFile,'BinFileVersion') $SFile = "\\ctmstxp\ctx$\pn.exe" $SVersion = GetFileVersion($SFile,'BinFileVersion')
If @ERROR 'Error getting LOCAL file information: ' + @ERROR + ' - ' + @SERROR ? EndIf 'Local file version is: ' + $LVersion ? 'Server file version is: ' + $SVersion ? If $SVersion <> $LVersion OPEN (1, "\\ctmstxp\ctx$\ica.txt", 5) WRITELINE (1, @USERID + " has old ica client version" + @CRLF) Close(1) ENDIF
|
|
Top
|
|
|
|
#163344 - 2006-06-16 05:46 PM
Re: Really easy one...
|
Mstudinski
Fresh Scripter
Registered: 2006-05-19
Posts: 25
|
Great. Works like a charm. Thanks a lot. I tried the same thing but forgot a +.
Matt
|
|
Top
|
|
|
|
#163346 - 2006-06-19 06:25 AM
Re: Really easy one...
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
Quote:
1.01.01" and "1.1.1" should be the same version
Well not to nit pick but no they are not the same version. Deciding if you're going to show the 1st digit, 2nd digit, 3rd digit may change how is visually looks. Excel has that feature too where you can sort numbers by how they are show on screen or how they REALLY are.
.10 vs .01 are still not the same.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|