-
Notifications
You must be signed in to change notification settings - Fork 0
/
show-vbs-info.bat
55 lines (54 loc) · 1.42 KB
/
show-vbs-info.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE rem|
@echo off
if %os%==%os:/=/% goto desktop
start cehta.exe "%0"
goto :eof
:desktop
start "%~n0" "%SystemRoot%\system32\mshta.exe" "%~f0"
goto :eof
>
<?cehta-options dialogWidth=28; dialogHeight=15; resizable=yes; status=yes?>
<html>
<head>
<hta:application id='dialogArguments' status='unsupported'/>
<style>
table
{
font-family: monospace;
border: 1px solid black;
border-collapse: collapse;
}
</style>
<script type='text/vbs'>
Option Explicit
Sub Window_OnLoad
dialogArguments.status = dialogArguments.commandLine & " (" & document.compatMode & ")"
Dim row, text
For Each row In report.rows
text = row.cells(0).innerText
If InStr(text, ".") = 0 Then
row.cells(1).innerText = Eval(text)
Else
On Error Resume Next
CreateObject text
If Err.Number > 0 Then
row.cells(1).innerText = "ERR#" & Err.Number
ElseIf Err.Number < 0 Then
' likely an HRESULT, therefore use hex notation
row.cells(1).innerText = "ERR#0x" & Hex(Err.Number)
End If
On Error GoTo 0
End If
Next
End Sub
</script>
</head>
<table id='report' border='1' cellpadding='5'>
<tr><td>ScriptEngine</td><td></td></tr>
<tr><td>ScriptEngineMajorVersion</td><td></td></tr>
<tr><td>ScriptEngineMinorVersion</td><td></td></tr>
<tr><td>ScriptEngineBuildVersion</td><td></td></tr>
<tr><td>VBScript.RegExp</td><td>OK</td></tr>
<tr><td>SRELL.RegExp</td><td>OK</td></tr>
</table>
</html>