• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2280
  • Last Modified:

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
0
anja12
Asked:
anja12
1 Solution
 
QlemoC++ DeveloperCommented:
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
 
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
Daz_1234Commented:
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
 
anja12Author Commented:
Thank you.
You helped with all the pieces I needed.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now