64bit browser trivia

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

64bit browser trivia

Post by pdwyer »

I'm running XP 64 at home now and learning some of the perculiarities. It seems that there is a 64bit and 32bit version of IE installed, sometime I see the *32 after the process and sometime not. looking at the two programfiles dirs there is a copy in each.

Flash doesn't run on 64bit so youtube won't work at all on 64bit version of IE7 (not sure about vista though) but if I'm running the 32bit version it's fine. At any one time, both browsers are sometimes running and it seems fairly seemless. Some activex plugins only work in one browser type and not others.

If someone has vista 64bit, can you check if:
- there are two browsers installed
- if you look at youtube, does the iexplore process have a *32 after it?
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Post by Thunder93 »

For Vista x64, Internet Explorer desktop shortcut points to the x86 version. In 'Start Menu \ Programs \' there's two shortcuts for Internet Explorer, 'Internet Explorer' (32-bit), 'Internet Explorer (64-bit)'.

You going to find there's some browser plugins that aren't going to be working under the x64 version of IE, nor likely have support for x64. One being as you already know ... adobe Flash Player - http://kb.adobe.com/selfservice/viewCon ... d=6b3af6c9, the second being Sun's Java Runtime Environment (JRE), "There are no 64-bit versions of the Java Plugin, Java Web Start or Java Control Panel; however the 32-bit versions of the JRE can be installed on 64-bit systems in order to obtain this functionality. Note that only 32-bit browsers are supported at this time. ".


Any 32-bit processes running will be shown with '*32' after the process name in Windows Task Manager.


Regards,
Thunder93
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: 64bit browser trivia

Post by SeregaZ »

I have a question about browser! :)

64 bit windows 7 or Vista, and probably 64 XP - have two iexplorers - 64bit and 32bit. how to know path for 32 bit iexplorer?

now i made RunProgram("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "https://blablabla", "", #PB_Program_Open)
but i need only 32bit. and for 64bit windows path probably must be like this C:\Program Files(86)\Internet Explorer\IEXPLORE.EXE

maybe somebody is know some path in registry where i can read this path? for 32 bit windows and 64 for 6-7-8version of explorers.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: 64bit browser trivia

Post by c4s »

Why don't you just use:

Code: Select all

RunProgram("http://www.purebasic.com")
In this case Windows will automatically open the desired browser.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: 64bit browser trivia

Post by SeregaZ »

no no no it will open default browser. it can be mozilla or google chrom, or whatever user setup to default.

so my programm is clean explorer from panels, add favorites, add some urls to safe-zone, and other - all it needs for normal work our system for tax. iexplorer works best on this system. mozilla need some additional settings, and opera too. google chrom is nice work, but i dont know how to manage some setups of chrome.

and browser must be 32bit. on 64bit system of creation of certificate is didnt work (stupid governments programmers). so when my program launch - first check windows 32 or 64bits, second must found explorer32 path.
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: 64bit browser trivia

Post by SeregaZ »

anybody?

if nobody, i have some idea - read path from registry:
RegGetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE","",".")

than replace \Program Files\ to \Program Files (x86)\

than read file: C:\Program Files\Internet Explorer (x86)\iexplore.exe

if read - windows system is 64, and i must to start iexplorer from here
if didnt read return path to C:\Program Files\Internet Explorer\iexplore.exe and start iexplore

but i am not like it...
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: 64bit browser trivia

Post by luis »

Uhm, AFAIK the key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE" always return the path of the 32 bit version of IE, both on x86 and x64.

So if you need the 32 bit version, just read that key value and use it.

This seem confirmed by this test also:

Code: Select all

CompilerIf Defined(KEY_WOW64_32KEY, #PB_Constant) = 0
 #KEY_WOW64_64KEY = $0100 ; Access a 64-bit key from either a 32-bit or 64-bit application.
 #KEY_WOW64_32KEY = $0200 ; Access a 32-bit key from either a 32-bit or 64-bit application.
CompilerEndIf


Procedure.s GetInternetExplorerPath (Wow64Flag)
; [DESC]
; Return the path of Internet Explorer for x86 or x64 applications.
;
; [INPUT]
; Wow64Flag : #KEY_WOW64_64KEY or #KEY_WOW64_32KEY
;
; [RETURN]
; The path of Internet Explorer
;
; [NOTES]
; You can call this from a 32 or 64 bit application and it will work either way.
; Using the #KEY_WOW64_32KEY you can access the x86 path.
; Using the #KEY_WOW64_64KEY you can access the x64 path.
; Requires an OS with WOW64, or you must pass 0 for the Wow64Flag if the OS does not support WOW64.
;
; Example:
; Debug GetInternetExplorerPath (#KEY_WOW64_32KEY) ; C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
; Debug GetInternetExplorerPath (#KEY_WOW64_64KEY) ; C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
 
Protected hReg
Protected RetBuf$ = Space(255), RetSize = Len(RetBuf$)

If RegOpenKeyEx_(#HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE", 0, #KEY_READ | Wow64Flag, @hReg) = #ERROR_SUCCESS
    If RegQueryValueEx_(hreg, "", 0, 0, @RetBuf$, @RetSize) <> #ERROR_SUCCESS
        RetBuf$ = ""
    EndIf
    RegCloseKey_(hReg)       
EndIf

ProcedureReturn Trim(RetBuf$)
EndProcedure

The same value (the 32 bit version) is returned on a 64 bit OS (win7 x64) using both flags.
Maybe this will change in the future.

On XP (x86) you can just call: Debug GetInternetExplorerPath (0).
XP 64 had wow64 too but I don't know if this code will work there. It should.
"Have you tried turning it off and on again ?"
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: 64bit browser trivia

Post by SeregaZ »

This code and Debug GetEnvironmentVariable("ProgramFiles") + "\Internet Explorer\IEXPLORE.EXE" works right :) Thanks!

on XP*32 - C:\Program Files\Internet Explorer\iexplore.exe
on 7*32 - C:\Program Files\Internet Explorer\iexplore.exe
on 7*64 - C:\Program Files\Internet Explorer (х86)\iexplore.exe
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Re: 64bit browser trivia

Post by pdwyer »

Really?

I hate throw a spanner in the works but when I look at "SET" on cmdline on my vista64 pc I get:

ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: 64bit browser trivia

Post by luis »

pdwyer wrote:Really?
On x64 depend on who is asking. If the process asking for the environment variable is 32 or 64 bit.
The value is altered accordingly.

You probably opened a 64 bit command prompt.

Anyway I would use the code instead of the environment var.
"Have you tried turning it off and on again ?"
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Re: 64bit browser trivia

Post by pdwyer »

good spot

if I run the cmd.exe that was hidden away in c:\windows\syswow64\ so that the process has the *32 on it I get

ProgramFiles=C:\Program Files (x86)
ProgramFiles(x86)=C:\Program Files (x86)
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: 64bit browser trivia

Post by SeregaZ »

luis always good spot :)
Post Reply