Solved

VB6:  Using fso.getfileversion("my.exe") returns 4 numbers..

Posted on 2006-10-26
3
1,771 Views
Last Modified: 2008-01-09
Hi all

I have an app where Version Major=2, Minor=0, and Revision=2.  My thinking is that this would display 2.0.2 as the version number.

When I run the below function, the MsgBox value is 2.0.0.2  

Why is it not 2.0.2, and what's the best way to do an apples-to-apples comparison here?
____

Public Function fn_get_exe_version_number()

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
MsgBox fso.getfileversion("myapp.exe")

End Function
_____

Thanks.
-Jim

0
Comment
Question by:Jim Horn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 50 total points
ID: 17812309
>Why is it not 2.0.2
why? well, because windows actually has 4 numbers for versions, but vb indeed only 3.
ask billy :-)

> and what's the best way to do an apples-to-apples comparison here?
I would compile a test app with major=1, minor=2 and revision=3 and see what the getfileversion returns from there :-)
0
 
LVL 66

Author Comment

by:Jim Horn
ID: 17812350
A vb.exe with Major=1, Minor=2, and Revision=3, when tested with fso.getfileversion, returned 1.2.0.3
0
 
LVL 5

Accepted Solution

by:
lunchbyte earned 450 total points
ID: 17813007
The third set of the version number is always zero for VB app. I always wondered why but it’s the way it is.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question