VB script to get file version in Windows

A short script for getting the file version in Windows. Can be used with both wscript.exe and cscript.exe.

on error resume next
Set objFSO = CreateObject("Scripting.FileSystemObject")
file = "c:\Windows\notepad.exe"
Wscript.Echo "File version: " & objFSO.GetFileVersion(file)

No comments: