How do I create a VBScript to open up IE8 32-bit and then 3 tabs?

I already began creating a VBScript that calls 3 .bat files to call each website in order?  I do not want to make the 3 Tabs the home pages in IE.
The current .js sript only calls the websites up in IE8 64-Bit, the websites in questions do not function properly in the 64-bit environment.
The script needs to be in the Startup of all Windows 7 PCs in the company.
We need the proper VB switches /structure to open IE8 and then on each of the other .bat files in a timed succession. testing.vbs testing.vbs
anja12Asked:
Who is Participating?
 
Daz_1234Connect With a Mentor Commented:
I believe that the problem is that the script is being called using the 64-bit of WScript.exe.

Therefore you have two options:

1. Use my snippet at ID:35439298 above in a vbscript called using:
        %Windir%\SysWOW64\WScript.exe yourscriptname.vbs


2. Use the technique in the script below to call itself using the 32-bit WSH:
If InStr(1, WScript.FullName, "System32", 1) <> 0 Then
    Dim wshShell
    Set wshShell = CreateObject("WScript.Shell")
    wshShell.Run wshShell.ExpandEnvironmentStrings("""%Windir%\SysWOW64\WScript.exe"" """) & WScript.ScriptFullName & """", 1, False
    WScript.Quit
End If

Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate2 "http://www.google.co.uk"
oIE.Navigate2 "http://www.google.cz", 4096
oIE.Navigate2 "http://www.google.cn", 4096
oIE.Navigate2 "http://www.google.it", 4096
oIE.Visible = True

Open in new window

Hope this helps,
Daz.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
That's puzzling, because 32bit IE is the default even on a 64bit system. If you just use
start "" "http://gmail.blyth.com"
start "" "http://gcalendar.blyth.com"
start "" "www.blythnet.com"

Open in new window

it should open all three sites in tabs in the default browser, which should be IE 32bit.
0
 
subhashchyCommented:
i think instead opening 3 tabs, it will open all webpages in same tab one by one and after execution of last line, IE will end up one tab with last webpage.

Yes, +1 for 32bit IE is the default even on a 64bit system.

If you add a pause for 2-3 seconds between commands it should work, try this ..works on mine..

@echo off
start "" "http://gmail.blyth.com"
CHOICE /T 3 /C ync /CS /D y
start "" "http://gcalendar.blyth.com"
CHOICE /T 3 /C ync /CS /D y
start "" "www.blythnet.com"

Open in new window

0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Daz_1234Commented:
Hi

Please try the code here, works fine for me on XP SP3 with IE8:
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate2 "http://www.google.co.uk"
oIE.Navigate2 "http://www.google.cz", 4096
oIE.Navigate2 "http://www.google.cn", 4096
oIE.Navigate2 "http://www.google.it", 4096
oIE.Visible = True

Open in new window

For those interested, the 4096 equates to a constant bit called 'navOpenInBackgroundTab' (Hex = 0x1000).  All of the bits are described here:  http://msdn.microsoft.com/en-us/library/aa768360(v=vs.85).aspx

Regards,
Daz.
0
 
Daz_1234Commented:
... Sorry I should have stated that my script above is VBScript: save as .vbs file.
0
 
anja12Author Commented:
thank you
but unfortunately the issue resides on a Windows 7 64-bit OS.
Daz1234- the current script in use mirrors yours and it does work on all the XP systems.  But it calls IE8 64-bit everytime.
subhashkey's fix is much closer to what is needed but there is still an issue.  The the first page opens to gmail but then the next page replaces that tab and then the other is opened.  Leaving only the last two URLs open in only two tabs.
Is there any other assistance you can offer.?
It needs to go into the Startup folder in Windows.
0
 
anja12Author Commented:
Thank you.
You helped with all the pieces I needed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.