Option Explicit Dim fso: Set fso = CreateObject("Scripting.FileSystemObject") Dim d, e, f, s: Set d = Dirs For Each e In d s = s & vbCrLf & vbCrLf & e Select Case TypeName(d(e)) Case "Folder" For Each f in d(e).Files s = s & FileVer(f) Next If e = "NoteWorthy Composer 2" Then s = s & ToolVer(d(e)) End If Case "File" s = s & FileVer(d(e)) Case Else s = s & " (not installed)" End Select Next WScript.Echo Mid(s, 5) Function FileVer(fo) FileVer = VerFormat(fo.Name, fso.GetFileVersion(fo)) End Function Function ToolVer(fldr) Dim f: f = fso.BuildPath(fldr, "scripts\lib\Nwc2Clips.inc") Dim php: php = fso.BuildPath(fldr, "php\php.exe") On Error Resume Next Dim exo: Set exo = CreateObject("WScript.Shell").Exec(php) exo.StdIn.WriteLine "" exo.Stdin.Close ToolVer = VerFormat(fso.GetFile(f).Name, exo.StdOut.ReadAll) End Function Function VerFormat(f, v) Dim e, r, a: a = Split(v & ".0.0.0", ".") If IsNumeric(a(0)) Then For Each e In a: r = r & "." & Right("0" & e, 2): Next VerFormat = vbCrLf & " " & Mid(r, 2, 11) & " " & f End If End Function Function Dirs Dim d: Set d = CreateObject("Scripting.Dictionary") Dim e, p, s: Set Dirs = d d("NoteWorthy Composer 2") = "" d("NoteWorthy Composer 2 Viewer") = "" d("NoteWorthy Composer") = "" d("NoteWorthy Player") = "" d("NoteWorthy Composer Browser Plug-in") = "" d("Winamp") = "" For Each e In d.Keys() s = UninstallVal(e & "\InstallLocation") If fso.FolderExists(s) Then Set d(e) = fso.GetFolder(s) Else s = UninstallVal(e & "\UninstallString") s = Mid(s, 1 - (Left(s, 1) = Chr(34))) Do p = InStrRev(s, "\") s = Left(s, p + (p > 0)) Loop Until fso.FolderExists(s) Or p = 0 If p Then Set d(e) = fso.GetFolder(s) End If Next e = "Winamp Plug-in": d.Key("Winamp") = e s = fso.BuildPath(d(e), "\Plugins\in_nwc.dll") If fso.FileExists(s) Then Set d(e) = fso.GetFile(s) End Function Function UninstallVal(s) On Error Resume Next UninstallVal = CreateObject("WScript.Shell").RegRead( _ "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\" & s) End Function