SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Fileversion of file properties

    Hello

    I need to read the file version or product version property. The aqFile and aqFilesystem objects only have the fileAttributes, lastSaved, lastModified ....
    properties, but not the file version.

    Somebody knows how to read the file version property
    of a file in the file system?

    Thanks in advance

    bercoz

  2. #2
    Junior Member
    Join Date
    Nov 2008
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Fileversion of file properties

    Hello

    I found the solution in an other forum:


    Function GetVersion;
    Var fso;
    Begin
    fso :=
    Sys.OleObject['Scripting.FileSystemObject'].GetFileVersion('C:\WINNT\NOTEPAD
    .EXE');
    ShowMessage(fso);
    End;


    bercoz

  3. #3
    Senior Member
    Join Date
    Oct 2003
    Posts
    928
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Fileversion of file properties

    Hello,

    You can use properties of the FileVersionInfo object to verify an executable file's version. See the "FileVersionInfo Object" help topic for additional information.
    Regards,
    Alex - SmartBear Support

  4. #4
    Moderator tristaanogre's Avatar
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA
    Posts
    1,792
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Fileversion of file properties

    This is the code we use in DelphiScript.

    <font class="small">Code:</font><hr /><pre>function GetFileVersion(FileName, Concat: Boolean = FALSE): String; {+45}
    {
    This function will return either the fully qualified file version
    (Major.Minor.Version.Build) or one that is concatenated down
    (to MajorMinor) in the event CONCAT is set to true.
    }

    var
    FSO;

    Begin
    FSO := Sys.OleObject['Scripting.FileSystemObject'].GetFileVersion(FileName);
    if Concat then begin
    Delete(FSO, Pos('.', FSO), 1);
    FSO := Copy(FSO, 1, Pos('.', FSO) - 1);
    end;
    Result := FSO;
    End;</pre><hr />
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:47 PM.

Copyright BetaSoft Inc.