[tips0160.vbs] Option Explicit On Error Resume Next Dim objShell ' Shell オブジェクト Dim objIE ' IE オブジェクト Set objShell = WScript.CreateObject("Shell.Application") For Each objIE In objShell.Windows() If InStr(LCase(objIE.FullName), "iexplore.exe") Then WScript.Echo objIE.LocationURL End If Next Set objShell = Nothing
C:\> cscript //NoLogo tips0160.vbs http://www.google.com/ file:///C:/Temp/Test.html about:blank