Dim objInstances, objIE, strURL
strURL = "
Set objInstances = CreateObject("Shell.Application").windows
If objInstances.Count > 0 Then ' To make sure we have IE instance open.
For Each objIE In objInstances
Dim sName
sName = UCASE(objIE.FullName)
If Right(sName, 12) = "IEXPLORE.EXE" Then ' Searching for internet explorer
objIE.Navigate strURL ' Navigate to intended URL
Exit For
End if
Next
Else
wscript.echo "No explorer windows are open."
End if
Sometimes there are simple solutions to complex problems, isn't it ?
1 comment:
Yeah baby, solutions are always simple!!!
Post a Comment