Results 1 to 6 of 6

Thread: What's the version of that File?!

  1. #1

    Thread Starter
    Member FrogBoy666's Avatar
    Join Date
    Aug 2000
    Location
    Columbia, SC
    Posts
    34

    Smile

    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?

  2. #2
    Guest

  3. #3
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    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

  4. #4
    Guest
    I don't think VB5 supports FileSystemObject, though.


  5. #5
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    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.


  6. #6

    Thread Starter
    Member FrogBoy666's Avatar
    Join Date
    Aug 2000
    Location
    Columbia, SC
    Posts
    34

    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
  •  



Click Here to Expand Forum to Full Width