Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-10-26
3
Medium Priority
?
1,792 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 200 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 1800 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

604 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