How to determine Windows architecture version on disconnected volume?

6

1

I have a scenario where I need to copy some Windows 10 files over to repair some form of corruption that SFC (System File Checker) does not appear to want to resolve entirely.

How can I determine the architecture type (32 or 64 bit) of a disconnected Windows volume via the command prompt or a Unix shell? I assume that there are some entries that can be pulled out from the registry hives or something of like nature to isolate arch type.

ylluminate

Posted 2015-09-14T17:04:20.313

Reputation: 760

4Look for "Program Files (x86)", if it doesn't exist, then it's 32-bit. – Ƭᴇcʜιᴇ007 – 2015-09-14T17:07:26.603

:D Ha, thanks for that obvious answer. I guess when you're in the middle of grinding on a headache like this you sometimes forget the most obvious. – ylluminate – 2015-09-14T17:08:41.113

1No problem. I can't seem to find a duplicate (seems like this would have been asked before), so I'll throw it in as an answer. :) – Ƭᴇcʜιᴇ007 – 2015-09-14T17:09:46.700

1

In case of badly damaged file system (No Program files ;)) you can try checking exe's bitness (eg. cmd.exe)

– PTwr – 2015-09-15T07:04:40.257

Answers

17

Look for "Program Files (x86)", if it doesn't exist, then it's 32-bit.

Related:

Ƭᴇcʜιᴇ007

Posted 2015-09-14T17:04:20.313

Reputation: 103 763

2in this case, the answer seems to be the dumbest, is the smartest, upvote btw ;) – Francisco Tapia – 2015-09-14T17:12:46.753

1In the same line of thought there is C:\Windows\SysWOW64 that should only exist on a 64-bit installation. – Kamen Minkov – 2015-09-15T07:51:24.200

3

There is no way to determine from the connection to the share itself what the platform of the server hosting the share is. The SMB protocol abstracts all of that information intentionally (this is why you can copy files to/from an NTFS share under Linux or a Mac where NTFS isn't supported).

You can glean this information anecdotally if the entire OS volume is shared (or by connecting to the C$ share -- which isn't available on non-Windows Samba servers). However, the best way to determine if the host is 64 or 32-bit is to look at the %PROCESSOR_ARCHITECTURE% environment variable on the host. The reason is because some badly-written software creates a Program Files (x86) folder or writes to a Wow6432 node in the registry even on 32-bit platforms, so their presence does not necessarily mean the platform is 64-bit.

However, all this depends on the host being available and you having the access to query it. There is no way, from a share alone on a server you don't otherwise have access to, to determine the platform of the OS hosting it if the files don't give you a hint.

Wes Sayeed

Posted 2015-09-14T17:04:20.313

Reputation: 12 024