Re: Extended file properties
From: Fosco (fake_at_fake.invalid)
Date: 08/28/04
- Previous message: McKirahan: "Re: User authentication using scripting?"
- In reply to: tet1953: "Extended file properties"
- Next in thread: mayayana: "Re: Extended file properties"
- Reply: mayayana: "Re: Extended file properties"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 28 Aug 2004 04:42:22 GMT
"tet1953"
> I have searched the forum for tips on how to get extended file
> properties, but haven't had any luck yet. What I'm after specifically
> is version information, such as that found when a file is
> right-clicked in Windows Explorer, then under the Version tab. The
> number given for Product Version would be perfect.
Set oFSO = CreateObject("Scripting.FileSystemObject")
sFilePath = "C:\windows\explorer.exe"
sFileVer = oFSO.GetFileVersion(sFilePath)
WScript.Echo sFileVer
sFilePath2 = "C:\WINDOWS\SYSTEM\SHELL32.DLL"
sFileVer2 = oFSO.GetFileVersion(sFilePath2)
WScript.Echo sFileVer2
' copied from this newsgoup maybe next time try first
' http://groups.google.com/advanced_group_search
sRegPath = "HKLM\SOFTWARE\Microsoft\Internet Explorer\Version"
Set oShell = CreateObject("wscript.shell")
On Error Resume Next
sIEVer = oShell.RegRead(sRegPath)
If Err <> 0 Then
sIEVer = "0.0.0.0"
End If
On Error Goto 0
aIEVer = Split(sIEVer, ".")
iMajorVersion = Cint(aIEVer(0))
iMinorVersion = Cint(aIEVer(1))
iBuildVersion = Cint(aIEVer(2))
iSubBuildVersion = Cint(aIEVer(3))
WScript.Echo "IE full version is : " & sIEVer
WScript.Echo "IE version is : " & iMajorVersion & "." & iMinorVersion
-- Fosco
- Previous message: McKirahan: "Re: User authentication using scripting?"
- In reply to: tet1953: "Extended file properties"
- Next in thread: mayayana: "Re: Extended file properties"
- Reply: mayayana: "Re: Extended file properties"
- Messages sorted by: [ date ] [ thread ]