forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@VERINFO() issue

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Feb 10, 2007 2:10 am    Post subject: @VERINFO() issue Reply with quote

I don't know if I would call this a bug or not but here goes...

I just recently came across an issue while checking the currently installed version of QuicktimePlayer.exe...

In the file properties dialog (Version Tab) at the top it displays 7.1.3.191 however if you click on the File Version attribute in the box below it shows 7.1.3 The correct version 7.1.3.191 as is displayed at the top. Now I realize that this is the fault of whoever updated the file but this doesn't solve my problem.

In VDS the @VERINFO() function returns 7.1.3

In VB the GetFileVersion() function returns 7.1.3.191

My problem is that I need to get the same info from VDS as VB.

I'm sure I can probably use the GadgetX extension but I'm using shared code so I'm trying to keep it simple.


Any ideas PLEASE!!!

Aslan


Last edited by Aslan on Sat Feb 10, 2007 3:39 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Feb 10, 2007 2:17 am    Post subject: Reply with quote

Aslan,
There are 2 distinc fields for version numbers. 1 is a DWORD value and the other is a string value type. Not sure which one you need but VDS 5 can get either or both...

Code:

%%version = @verinfo(<somefile>,V)
%%productversion = @verinfo(<somefile>,X)


I hope this helps...

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Feb 10, 2007 3:28 am    Post subject: Reply with quote

Unfortunately the file in question only shows 7.1.3 for the Product Version Sad

Here's a pic of what I'm talking about



QTprod.bmp
 Description:
 Filesize:  102.69 KB
 Viewed:  720 Time(s)

QTprod.bmp



QTprop.bmp
 Description:
 Filesize:  102.29 KB
 Viewed:  741 Time(s)

QTprop.bmp


Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Feb 10, 2007 5:11 pm    Post subject: Reply with quote

Aslan,
Below is how you would get the File Version the same way that VB or VB script gets this information. The code below uses GadgetX

Code:

#-----------------------------------------------------------------------------#
#                                                                             #
# Shows how to use the VB Script FileSystemObject to collect the Version      #
# of a file                                                                   #
#                                                                             #
# Author:  Johnny Kinsey                                                      #
#                                                                             #
# Copyright: Copyright 2007 Dragon Sphere Software                          #
#                                                                             #
#-----------------------------------------------------------------------------#

#-----------------------------------------------------------------------------#
#Option Explicit                                                              #
#Dim oFSO                                                                     #
#Dim sPath, sFileVer, sFileName                                               #
#                                                                             #
#sPath = "d:\app\quicktime\quicktimeplayer.exe"                               #
#Set oFSO = CreateObject("Scripting.FileSystemObject")                        #
#                                                                             #
#sFileVer = oFSO.GetFileVersion(sPath)                                        #
#sFileName = oFSO.GetFileName(sPath)                                          #
#                                                                             #
#Wscript.Echo sFileName & " " & sFileVer                                      #
#Set oFSO = Nothing                                                           #
#                                                                             #
#-----------------------------------------------------------------------------#

Title File Version
External gadgetx.dll,@SysInfo(DSVER)
If @Greater(@Name(@SYSINFO(DSVER)),4)
  #DEFINE COMMAND,GADGETX,DEFINE,OLE,SET
  #DEFINE FUNCTION,GADGETX,OLE,GET
End

Define Variable,Object,oFSO
Ole Init
%%sPath = "C:\Program Files\QuickTime\quicktimeplayer.exe"
Set oFSO,@Ole(Create,Scripting.FileSystemObject,NULL)
If @Get(oFSO)
  # Retrieve the file version of the specified file into a string
  %%sFileVer = @Ole(Call,oFSO,^B,"GetFileVersion(^B)",%%sPath)
  %%sFileName = @Name(%%sPath).@Ext(%%sPath)
  Info %%sFileName %%sFileVer
  Ole Free,Object,oFSO
End

Stop



Have fun...

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Feb 10, 2007 7:03 pm    Post subject: Reply with quote

Thanks DS Very Happy

Believe it or not I actually have used GadgetX for this before.

Due to the fact that I'm using shared code with others at work on this project I was trying to stay as native as possible.

But hey, this might mean I may need to buy more GadgetX licenses from ya Wink

I haven't checked yet but hopefully you also posted this code in the GadgetX forum for others to use Smile
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Feb 10, 2007 7:14 pm    Post subject: Reply with quote

Aslan,
No I have not posted it over in my forum yet. I guess I will do that. Hey I am always up for selling multiple licenses of GadgetX. I will give you a discount based on the number of licenses you want. We can discuss it via PM if you like.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Feb 10, 2007 7:29 pm    Post subject: Reply with quote

Ok I have posted this code at my forums now...

Have fun...

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group