'// Check Excel.Application existence
If IsNull(RegRead("HKCR\Excel.Application\")) Then
MsgBox "Excel.Application object not found on this computer !",48
WScript.Quit
Else
'// Check Excel version
MsgBox "Excel version " & Mid(RegRead("HKCR\Excel.Application\CurVer\"), 19)
End If
Function RegRead(ByVal RegPath)
On Error Resume Next
RegRead = CreateObject("wscript.shell").RegRead(RegPath)
If Err Then
Err.Clear
RegRead = Null
End If
On Error GoTo 0
End Function