I would like to be able to retrieve the version of an .exe or .dll file -- similar to what you get when you right click ->properties->version->file version in windowsXP.
Is there another way to do this that I am missing? Something in VBScript maybe?
Thanks.
Get Version of a program
Moderators: JRL, Dorian (MJT support)
Yep, like this:
VBSTART
Function FileVer(filename)
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
FileVer=objFSO.GetFileVersion(filename)
End Function
VBEND
VBEval>FileVer("C:\WINDOWS\system32\nslookup.exe"),ver
MessageModal>ver
VBSTART
Function FileVer(filename)
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
FileVer=objFSO.GetFileVersion(filename)
End Function
VBEND
VBEval>FileVer("C:\WINDOWS\system32\nslookup.exe"),ver
MessageModal>ver
MJT Net Support
[email protected]
[email protected]
Version Info
That is WONDERFUL!
Thank you VERY MUCH!!!!!!!!!!!!!!!!!!!!!!!!!
I continue to be VERY impressed with MJTNET.
Thank you VERY MUCH!!!!!!!!!!!!!!!!!!!!!!!!!
I continue to be VERY impressed with MJTNET.
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
I Am Currently Using A Script Which Has The Program's Version Number In As A Wait Window Command.
What I Am Trying To Do Is Have The Macro Use The Above Posted Script To Obtain The Version Number So I Can Use The Macro.
The Problem I Am Having Is That The Version Number Is 1.3.0.61, However In The Program Window Title Its 1.3.61 Window Title* However It Needs To Be Exact.
What I Am Trying To Do Is Have The Macro Use The Above Posted Script To Obtain The Version Number So I Can Use The Macro.
The Problem I Am Having Is That The Version Number Is 1.3.0.61, However In The Program Window Title Its 1.3.61 Window Title* However It Needs To Be Exact.
FIREFIGHTER
CyberCitizen,
I may be missing something here but... To do exactly what you've asked with this particular version number and using the Separate function as you suggested, try something like this:
I may be missing something here but... To do exactly what you've asked with this particular version number and using the Separate function as you suggested, try something like this:
Make sure there are no trailing spaces.Let>ver=1.3.0.61
Let>newver=
Sep>ver,.,part
Let>k=0
Repeat>k
If>newver
concat>newver,.
EndIf
Let>k=k+1
Let>tempvar=part_%k%
If>tempvar0
concat>newver,tempvar
EndIf
Until>k,part_count
MDL>%newver%
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Oops... guess I didn't carefully examine the answer, I missed the double dot.
try this one:
Dick
try this one:
Hope this is better,Let>ver=1.3.0.61
Let>newver=
Sep>ver,.,part
Let>k=0
Repeat>k
If>newver
concat>newver,.
EndIf
Let>k=k+1
Let>tempvar=part_%k%
If>tempvar0
concat>newver,tempvar
Else
Len>newver,le
Let>le=le-1
Midstr>newver,1,le,newver2
Let>newver=newver2
EndIf
Until>k,part_count
MDL>%newver%
Dick
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia