Discussion:
32 & 64 bit Programs
(too old to reply)
SteveGG
2017-09-16 14:08:16 UTC
Permalink
Is there an easy way to tell if an app is 32 or 64 ?

Probably answered before but can't recall ....
Paul
2017-09-16 16:01:52 UTC
Permalink
Post by SteveGG
Is there an easy way to tell if an app is 32 or 64 ?
Probably answered before but can't recall ....
Mayayana probably has some code for this.

I on the other hand, specialize in answers you won't like :-)

*******

This is easy with the Bash shell in Windows 10. You
use the "file" command in Bash. Note that "file.exe" is
also available in GNUWIN32 (runs on Windows), as well
as Cygwin (runs on Windows). And none of those options
is going to make you happy (setting those up, takes work).

A "PE32" is a 32-bit program.

A "PE32+" is a 64-bit program. They seemed a bit timid
when picking a name for that one :-) .

Loading Image...

More info is available here, if you need additional flavorings.

https://en.wikipedia.org/wiki/Portable_Executable

Paul
Mayayana
2017-09-16 16:22:39 UTC
Permalink
"Paul" <***@needed.invalid> wrote

| > Is there an easy way to tell if an app is 32 or 64 ?
| >
| > Probably answered before but can't recall ....
|
| Mayayana probably has some code for this.
|
| I on the other hand, specialize in answers you won't like :-)
|

I think you should get the Pithy Response of the Month
for that one. :)

Actually, Mayayana considered firing up HxD and
documenting the actual header differences, but then
he had a moment of common sense and realized:

* SteveGG asks dumb questions for no apparent reason.

* SteveGG can't even be bothered to pick the right
newsgroup, often multi-posting to both Win7 and
Win10.

* Who cares? If I'm on 32-bit and try to run 64-bit
it won't work. If I download an installer it tells me.
If I'm on 64-bit then I can tell by the parent folder.
Ed Cryer
2017-09-16 19:55:48 UTC
Permalink
Post by Mayayana
| > Is there an easy way to tell if an app is 32 or 64 ?
| >
| > Probably answered before but can't recall ....
|
| Mayayana probably has some code for this.
|
| I on the other hand, specialize in answers you won't like :-)
|
I think you should get the Pithy Response of the Month
for that one. :)
Actually, Mayayana considered firing up HxD and
documenting the actual header differences, but then
* SteveGG asks dumb questions for no apparent reason.
* SteveGG can't even be bothered to pick the right
newsgroup, often multi-posting to both Win7 and
Win10.
* Who cares? If I'm on 32-bit and try to run 64-bit
it won't work. If I download an installer it tells me.
If I'm on 64-bit then I can tell by the parent folder.
If we're all under Win7 here, then I can give my answer. Look in Task
Manager, Processes.
*32 after an .exe means what it says on the tin.

Ed
David E. Ross
2017-09-17 00:11:59 UTC
Permalink
Post by Mayayana
| > Is there an easy way to tell if an app is 32 or 64 ?
| >
| > Probably answered before but can't recall ....
|
| Mayayana probably has some code for this.
|
| I on the other hand, specialize in answers you won't like :-)
|
I think you should get the Pithy Response of the Month
for that one. :)
Actually, Mayayana considered firing up HxD and
documenting the actual header differences, but then
* SteveGG asks dumb questions for no apparent reason.
* SteveGG can't even be bothered to pick the right
newsgroup, often multi-posting to both Win7 and
Win10.
* Who cares? If I'm on 32-bit and try to run 64-bit
it won't work. If I download an installer it tells me.
If I'm on 64-bit then I can tell by the parent folder.
I do not install applications in [C:\Program Files] or [C:\Program Files
(x86)] if the installer allows an alternative location. I do not even
install applications on my C-drive if I can install them on another
drive. Thus, looking at the parent folder does not answer the question.

Ed Cryr has the correct answer. To expand his answer:

1. If your system is 32-bit, you are unlikely to be able to install a
64-bit application and even less likely to be able to execute it if
somehow you do install it.

2. If your system is 64-bit, you can successfully instal and execute
both 32-bit and 64-bit applications. In that case, do indeed execute
the application. Then right-click on the task bar and select Start Task
Manager from the pull-down context menu. On the Windows Task Manager
window, select the Processes tab. Find the application under Image
Name. If the name of the application is followed with *32, it is a
32-bit application; otherwise, it is a 64-bit application.
--
David E. Ross
<http://www.rossde.com/>

Yes, George Washington, Thomas Jefferson, and other
"founding fathers" owned slaves. However, they created
a nation. Robert E. Lee, Jefferson Davis, Thomas
"Stonewall" Jackson and other "heroes" of the
Confederacy tried to tear the nation apart. Statues
and other monuments to those "heroes" of the
Confederacy actually celebrate traitors and treason.

See my <http://www.rossde.com/editorials/edtl_conf_flag.html>.
Ken Blake
2017-10-19 19:14:59 UTC
Permalink
On Sat, 16 Sep 2017 17:11:59 -0700, "David E. Ross"
Post by David E. Ross
1. If your system is 32-bit, you are unlikely to be able to install a
64-bit application and even less likely to be able to execute it if
somehow you do install it.
"Unlikely" is an understatement. You can not run a 64-bit program in
32-bit Windows.
Big Al
2017-10-19 20:04:27 UTC
Permalink
Post by Ken Blake
On Sat, 16 Sep 2017 17:11:59 -0700, "David E. Ross"
Post by David E. Ross
1. If your system is 32-bit, you are unlikely to be able to install a
64-bit application and even less likely to be able to execute it if
somehow you do install it.
"Unlikely" is an understatement. You can not run a 64-bit program in
32-bit Windows.
I tried once and the initial stub does load, at least on the program I
was trying to install but it detected no 64bit machine and just printed
an error on the screen and then stopped.

Mike S
2017-09-17 00:49:24 UTC
Permalink
Post by Mayayana
| > Is there an easy way to tell if an app is 32 or 64 ?
| >
| > Probably answered before but can't recall ....
|
| Mayayana probably has some code for this.
|
| I on the other hand, specialize in answers you won't like :-)
|
I think you should get the Pithy Response of the Month
for that one. :)
Actually, Mayayana considered firing up HxD and
documenting the actual header differences, but then
* SteveGG asks dumb questions for no apparent reason.
* SteveGG can't even be bothered to pick the right
newsgroup, often multi-posting to both Win7 and
Win10.
* Who cares? If I'm on 32-bit and try to run 64-bit
it won't work. If I download an installer it tells me.
If I'm on 64-bit then I can tell by the parent folder.
Lol, if they don't have a hex editor, even a text editor can be used:

"Open the executable in text editor....

Check the first printable characters after the first occurrence of PE.
This part is most likely to be surrounded by at least some whitespace
(could be a lot of it), so it can be easily done visually.

Here is what you're going to find:

x86: PE L

x64: PE d†

https://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows
Auric__
2017-09-16 21:09:40 UTC
Permalink
Post by SteveGG
Is there an easy way to tell if an app is 32 or 64 ?
Probably answered before but can't recall ....
You can tell by examining the app itself (in a hex viewer). Byte 0x3C points
to the PE header, which starts with "PE\0\0"; right after that is a 2-byte
integer that specifies the hardware platform: 64 86 (0x8664) = x64, 4C 01
(0x014C) = i386 (extremely rare alternates: 0x014D = i486; 0x015D = i586).
There are around a dozen other platforms that are included in the specs.
--
So now we're pleading "Not Guilty by Virtue of Two Wrongs Make a Right"?
Zo
2017-09-17 13:22:19 UTC
Permalink
Post by SteveGG
Is there an easy way to tell if an app is 32 or 64 ?
Probably answered before but can't recall ....
Yes there is,

right click on the application file, click on properties, click on the
Compatibility Tab, in the "Run as" box, if you see XP its 32, if you
see Vista its 64.
--
Zo

"Please take one step forward and crap twice." -- A sign in a temple in
China.
Mike S
2017-09-17 21:56:38 UTC
Permalink
Post by Zo
Post by SteveGG
Is there an easy way to tell if an app is 32 or 64 ?
Probably answered before but can't recall ....
Yes there is,
right click on the application file, click on properties, click on the
Compatibility Tab, in the "Run as" box, if you see XP its 32, if you see
Vista its 64.
nice!
JJ
2017-09-17 16:33:41 UTC
Permalink
Post by SteveGG
Is there an easy way to tell if an app is 32 or 64 ?
Probably answered before but can't recall ....
You can use below VBScript if you want. It only expect one command line
argument, which is a file path.

set fso = createobject("scripting.filesystemobject")
s = fso.getfile(wscript.arguments(0)).size
if s >= 1024 then
set f = fso.opentextfile(wscript.arguments(0), 1, false, 0)
if f.read(2) = "MZ" then
f.read(58)
o = asc(f.read(1))
o = (asc(f.read(1)) * 256) + o
o = (asc(f.read(1)) * 65536) + o
o = (asc(f.read(1)) * 16777216) + o
f.read(o - 64)
if f.read(2) = "PE" then
f.read(2)
select case f.read(1)
case "L":
wscript.echo "File is a 32-bit Windows executable."
case "d":
wscript.echo "File is a 64-bit Windows executable."
case else:
wscript.echo "File is an unknown type of Windows executable."
end select
else
s = 0
end if
else
s = 0
end if
f.close
else
s = 0
end if
if s = 0 then
wscript.echo "File is not a valid Windows executable."
end if
Loading...