Auto Navigate to web address from VBSCRIPT

I've got a script that automatically navigates to a dynamic URL based on some parameters.  Ideally, each time it runs it takes the current IE window that is open and navigates that page to the new URL.  On most machines it navigates just fine in the same window... there are a few however that continually open a new window each time which is a problem.  Any ideas of some settings that may cause this?  I've double checked INTERNET TOOLS --> TABS and the associated settings there with no luck... These are all IE7 machines with no major differences between them...

Here's the code that's executing...

Set IE = GetObject("internetexplorer.application")
IE.Visible = True
IE.Navigate2 URL

jimtxasAsked:
Who is Participating?
 
RobSampsonConnect With a Mentor Commented:
What about trying it this way:

Set objShell = CreateObject("Shell.Application")
Set objShellWindows = objShell.Windows
Set IE = objShellWindows.Item
URL = "http://www.google.com"
IE.Navigate2 URL

Regards,

Rob.
0
 
Robberbaron (robr)Commented:
1/ are they different IE versions ?  Specifically IE6 vs IE7
2/ what happens if there is more than 1 IE application open ?  I dont know how the GetObject would get just the active IE application.
3/ does it work with IE7 tabs ?
0
 
jimtxasAuthor Commented:
1) no... IE7 only
2) always opens another window
3) no
0
 
Robberbaron (robr)Commented:
so the script is acting as if there is already an IE instance open.

You may need to check the tasklist on those pc's. Perhaps there is an application openning inside an IE control.  eg Acrobat can open inside IE.
0
 
RobSampsonCommented:
Thanks for the grade.

Regards,

Rob.
0
All Courses

From novice to tech pro — start learning today.