giovedì 26 settembre 2013

[VB6] Sapere con VB6 la versione di un file exe

Public Function versionefile(sPath As String, sFileName As String) As String
Dim oFolder As Object
Dim oItem As Object

  Set oFolder = CreateObject("Shell.Application").NameSpace(sPath & "")
  For Each oItem In oFolder.Items
    Debug.Print oItem.Name
    If LCase(oItem.Name) = LCase(sFileName) Then
      versionefile = oFolder.GetDetailsOf(oItem, 39)
    End If
  Next
  Set oFolder = Nothing

End Function

Nessun commento:

Posta un commento