Hi all,
Is there a way of getting the version of an EXE file?
Sort of like using FileOpenBox and getting "1.1.0.0" of the selected file?
Moderator: Neosoft Support
{NeoBook Function}
Version=5,80
Language=VBScript
Param=[%1]|FileName|Full path to file
Param=[%2]|Variable|Result variable
{End}
Set objFS = CreateObject("Scripting.FileSystemObject")
nbSetVar "[%2]", objFS.GetFileVersion(objFS.GetFile("[%1]"))
Set objFS = Nothing
Tony Kroos wrote:
- Code: Select all
{NeoBook Function}
Version=5,80
Language=VBScript
Param=[%1]|FileName|Full path to file
Param=[%2]|Variable|Result variable
{End}
Set objFS = CreateObject("Scripting.FileSystemObject")
nbSetVar "[%2]", objFS.GetFileVersion(objFS.GetFile("[%1]"))
Set objFS = Nothing
' Get file version
Function GetVersion(DriveSpec)
Dim fso, temp
Set fso = CreateObject("Scripting.FileSystemObject")
temp = fso.GetFileVersion(DriveSpec)
If Len(temp) Then
GetVersion = temp
Else
GetVersion = "No version information available."
End If
End Function
publication.nbSetVar "[%2]", GetVersion("[%1]")
Tony Kroos wrote:You always make things more complex than it should
Return to General NeoBook Discussions
Users browsing this forum: No registered users and 4 guests