![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | determine app is 32 or 64 bit I like to determine whether an application is 32 or 64 bit on windows server 2008. Is that a shell command to do that? |
My System Specs![]() |
| | #2 (permalink) |
| | RE: determine app is 32 or 64 bit You are not clear as to whether you want to know 1) Is foo.exe 32 or 64 bit application 2) When running foo.exe which environment are you running in (32 or 64). I had ask the Powershell group to document 2). They may have but I've not found it. For 1) you will need to crack the PE header and look at the Magic value within the IMAGE_OPTIONAL_HADER section of the PE header http://msdn.microsoft.com/en-us/libr...39(VS.85).aspx I don't know if this can be done using .NET classes For 2) the situation is easier even though there are more permutations 2a) 32 bit process running in 32 bit Windows: [intptr]::size -eq 4 2b) 32 bit process running in 64 bit Windows: [intptr]::size -eq 4 -and (Test-Path Env:PROCESSOR_ARCHITEW6432) 2c 64 bit process [intptr]::size -eq 8 bob "powah" wrote: Quote: > I like to determine whether an application is 32 or 64 bit on windows > server 2008. Is that a shell command to do that? > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: determine app is 32 or 64 bit On Aug 5, 8:55*pm, Bob Landau <BobLan...@xxxxxx> wrote: Quote: > You are not clear as to whether you want to know > > 1) Is foo.exe 32 or 64 bit application > > 2) When running foo.exe which environment are you running in (32 or 64). > > I had ask the Powershell group to document 2). *They may have but I've not > found it. > > For 1) you will need to crack the PE header and look at the Magic value > within the IMAGE_OPTIONAL_HADER section of the PE header > > http://msdn.microsoft.com/en-us/libr...39(VS.85).aspx > > I don't know if this can be done using .NET classes > > For 2) *the situation is easier even though there are more permutations > > 2a) 32 bit process running in 32 bit Windows: * *[intptr]::size -eq 4 > > 2b) 32 bit process running in 64 bit Windows: * *[intptr]::size -eq 4-and > (Test-Path Env:PROCESSOR_ARCHITEW6432) > > 2c 64 bit process *[intptr]::size -eq 8 > > bob > > "powah" wrote: Quote: > > I like to determine whether an application is 32 or 64 bit on windows > > server 2008. Is that a shell command to do that? application? Your answer implies that there is no shell command to do something like this: C:\>apptype foo.exe 64 bit unmanaged application |
My System Specs![]() |
| | #4 (permalink) |
| | Re: determine app is 32 or 64 bit None that I know of however I wouldn't be surprised if there is one out there someplace. Check SysInternals and perhaps search for PE reader "powah" wrote: Quote: > On Aug 5, 8:55 pm, Bob Landau <BobLan...@xxxxxx> > wrote: Quote: > > You are not clear as to whether you want to know > > > > 1) Is foo.exe 32 or 64 bit application > > > > 2) When running foo.exe which environment are you running in (32 or 64). > > > > I had ask the Powershell group to document 2). They may have but I've not > > found it. > > > > For 1) you will need to crack the PE header and look at the Magic value > > within the IMAGE_OPTIONAL_HADER section of the PE header > > > > http://msdn.microsoft.com/en-us/libr...39(VS.85).aspx > > > > I don't know if this can be done using .NET classes > > > > For 2) the situation is easier even though there are more permutations > > > > 2a) 32 bit process running in 32 bit Windows: [intptr]::size -eq 4 > > > > 2b) 32 bit process running in 64 bit Windows: [intptr]::size -eq 4 -and > > (Test-Path Env:PROCESSOR_ARCHITEW6432) > > > > 2c 64 bit process [intptr]::size -eq 8 > > > > bob > > > > "powah" wrote: Quote: > > > I like to determine whether an application is 32 or 64 bit on windows > > > server 2008. Is that a shell command to do that? > I ask about 1) Is unmanaged application foo.exe 32 or 64 bit > application? > Your answer implies that there is no shell command to do something > like this: > C:\>apptype foo.exe > 64 bit unmanaged application > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: determine app is 32 or 64 bit I found one; it's a CodeProject demo, but includes console demo code and the binaries, and can be used to check 32/64 for a binary (as well as some other attributes). http://www.codeproject.com/KB/files/XPEInfo.aspx "Bob Landau" <BobLandau@xxxxxx> wrote in message news:24BF266B-6070-45F5-9A3B-06FA4B549641@xxxxxx Quote: > None that I know of however I wouldn't be surprised if there is one out > there > someplace. > > Check SysInternals and perhaps search for PE reader > > "powah" wrote: > Quote: >> On Aug 5, 8:55 pm, Bob Landau <BobLan...@xxxxxx> >> wrote: Quote: >> > You are not clear as to whether you want to know >> > >> > 1) Is foo.exe 32 or 64 bit application >> > >> > 2) When running foo.exe which environment are you running in (32 or >> > 64). >> > >> > I had ask the Powershell group to document 2). They may have but I've >> > not >> > found it. >> > >> > For 1) you will need to crack the PE header and look at the Magic value >> > within the IMAGE_OPTIONAL_HADER section of the PE header >> > >> > http://msdn.microsoft.com/en-us/libr...39(VS.85).aspx >> > >> > I don't know if this can be done using .NET classes >> > >> > For 2) the situation is easier even though there are more permutations >> > >> > 2a) 32 bit process running in 32 bit Windows: [intptr]::size -eq 4 >> > >> > 2b) 32 bit process running in 64 bit Windows: [intptr]::size -eq >> > 4 -and >> > (Test-Path Env:PROCESSOR_ARCHITEW6432) >> > >> > 2c 64 bit process [intptr]::size -eq 8 >> > >> > bob >> > >> > "powah" wrote: >> > > I like to determine whether an application is 32 or 64 bit on windows >> > > server 2008. Is that a shell command to do that? >> I ask about 1) Is unmanaged application foo.exe 32 or 64 bit >> application? >> Your answer implies that there is no shell command to do something >> like this: >> C:\>apptype foo.exe >> 64 bit unmanaged application >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| determine if PC is on a certain network | VB Script | |||
| Determine File Version of a dll | PowerShell | |||
| Determine PST Format | PowerShell | |||
| How Do I Determine The Serial Port In Use? | Vista hardware & devices | |||
| API to determine if UAC is enabled? | Vista security | |||