|
-
Aug 1st, 2000, 03:27 PM
#1
Thread Starter
Member
I'm writing a program that needs to get the version number of another file (such as the rundll32.exe file). Can anyone help me with this?
-
Aug 1st, 2000, 03:52 PM
#2
-
Aug 1st, 2000, 04:03 PM
#3
Hyperactive Member
I personally like using the API for most everything, but you could also use the FilesystemObject:
Code:
Private Sub Command1_Click()
'This would be if you referenced the object
'If you doing set the reference, you would need to use
'the createobject like this:
'Dim fso
'Set fso=CreateObject("scripting.FilesystemObject")
Dim FSO As FileSystemObject
Set FSO = New FileSystemObject
MsgBox FSO.GetFileVersion("c:\windows\rundll32.exe")
End Sub
-
Aug 1st, 2000, 04:12 PM
#4
I don't think VB5 supports FileSystemObject, though.
-
Aug 1st, 2000, 05:08 PM
#5
Hyperactive Member
Megatron,
You might know better then I, but as long as you have the scrrun.dll on you machine (and this in native to Win98 and I believe NT 3.51 or can be download from just about anywhere [I usually get updates when I download new VBscript versions]) you could at the very least, use the CreateObject method and late bind the object (even if vb5 doesn't support it). You just wouldn't get the benefit of MS's intellsense to find all the functions/subs that you can use in the object.
-
Aug 1st, 2000, 05:40 PM
#6
Thread Starter
Member
Thanks!
They both worked great! Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|