Hah! How to make IE x64 the default browser!

  • Thread starter Dave \Crash\ Dummy
  • Start date
D

Dave \Crash\ Dummy

I discovered (to my annoyance) some time ago that when IE is run as an
application object in a VB script on my 64 bit Windows machine, the 64
bit IE kernel is used, and if IE is called when the script IE is
running, say by clicking a link, IE x64 is called instead of IE x86. So,
to effectively make IE x64 the default browser, I just have to run a
small script (one line) to activate the InternetExplorer application.

'================== IE64run.vbs =================
Set IE = CreateObject("InternetExplorer.Application")
'=============================================

This can be done manually, or from the Startup folder. To disable it,
use the Task Manager.

I have only just come up with this scheme, so I don't know if it will
work (or is desirable) in all situations. Also, I am running IE 8 not
IE 9. Feedback welcome and desired.
 
V

VanguardLH

Dave said:
I discovered (to my annoyance) some time ago that when IE is run as an
application object in a VB script on my 64 bit Windows machine, the
64 bit IE kernel is used, and if IE is called when the script IE is
running, say by clicking a link, IE x64 is called instead of IE x86.
How were you creating the IE object before?
So, to effectively make IE x64 the default browser, I just have to run
a small script (one line) to activate the InternetExplorer
application.

'================== IE64run.vbs =================
Set IE = CreateObject("InternetExplorer.Application")
'=============================================

This can be done manually, or from the Startup folder. To disable it,
use the Task Manager.
Um, why isn't this included in the VBscript where you want to *use* this
object?
I have only just come up with this scheme, so I don't know if it will
work (or is desirable) in all situations. Also, I am running IE 8 not
IE 9. Feedback welcome and desired.
That's pretty much what I see used at many sites showing their code,
some pretty dated, like:

http://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx
http://technet.microsoft.com/en-us/library/ee176580.aspx
http://quicktestprofessional.wordpress.com/category/vbscript-and-ie-automation/
http://www.visualbasicscript.com/quotInternetExplorerApplicationquot-object-example-1-m61686.aspx
http://visualbasic.about.com/od/standalonevb6/l/blnewieinstance.htm

Seems a topic more appropriate (for continued discussion) to the
microsoft.public.scripting.vbscript newsgroup. I see you've been over
there before.
 
D

Dave \Crash\ Dummy

VanguardLH said:
How were you creating the IE object before?


Um, why isn't this included in the VBscript where you want to *use*
this object?


That's pretty much what I see used at many sites showing their code,
some pretty dated, like:

http://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx
http://technet.microsoft.com/en-us/library/ee176580.aspx
http://quicktestprofessional.wordpress.com/category/vbscript-and-ie-automation/

http://www.visualbasicscript.com/quotInternetExplorerApplicationquot-object-example-1-m61686.aspx
http://visualbasic.about.com/od/standalonevb6/l/blnewieinstance.htm

Seems a topic more appropriate (for continued discussion) to the
microsoft.public.scripting.vbscript newsgroup. I see you've been
over there before.
I think you missed the point. I wanted to make IE x64 the default
browser for normal use, not for scripting. I am using the one line
script to effect that.
 
V

VanguardLH

Dave said:
I think you missed the point. I wanted to make IE x64 the default
browser for normal use, not for scripting. I am using the one line
script to effect that.
But it seems you are *loading* an instance of IE x64. I've seen other
articles by developers who noted that they had to first open IE x64 so
their programs used that instead of the 32bit (x86) version.

When you create this object and after the script exits, how does the
object remain defined? It seems it must load an instance of IE. If
true then why do you need a script versus just a simply shortcut? If
you need it loaded everytime you login, seems a scheduled task
configured to run on login would work.

Internet Options -> Programs says "Internet Explorer (64-bit) cannot be
the default web browser. While my reading shows that it appears
Microsoft gave no easy option to make IE8/9 x64 the default, it seems
you could alter the .website and URL filetype associations to run the
64bit version. You would change the filetype from running the x86
version to running the 64bit version instead. Of course, that only
works when you click on a hypertext link somewhere. I haven't done this
so I don't under what scope it won't work.

Then there's the trick of just sliding one file in place of another.
Rename the exe under %systemdisk%\program files\internet explorer\ to
something else, like iexplore32. Then copy the 64-bit version into that
path using the filename for the 32-bit version. Now whenever a filetype
association or program path in the registry loads IE, it'll be using the
64-bit version. The filetype associations and registry paths are just
paths. There is no CRC or hash checking to ensure that you are running
a specific version (and how malware can slide its executable in place of
another). You could even write a batch file that swaps the 2 files in
that path: you run the batch file and it swaps the files, you run it
again and it swaps them back, so you can change which one gets used
until you toggle again.

From what I read, and without having a copy of the user-agent (UA)
string, it looks like using the 64bit version will run you afoul of web
sites that won't know how to recognize the web client that is connecting
to them. So despite being able to use whatever add-ons you installed,
you could have problems at the web sites not coded to understand the UA
from the 64bit version and might behave oddly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top