File::getFileIdentifier() gives two different results for x86 and x64 builds on Windows


#1

Trying to pull a Machine ID from File::getSpecialLocation(File::windowsSystemDirectory).getFileIdentifier() I found out that I get two different results, under Windows 7, for the x86 and for the x64 builds. Any explanation? Is there any way I can get the same results I get for the x64 build with the x86 build as well?


#2

Is the Windows System Directory physically the same directory between the two builds? I doubt it, and thus the Identifier will be different.


#3

Yes, running the two executables, 32 and 64 bit, on the same machine, gives two different results, even if they point to the same folder which is C:\Windows\system32


#4

Oh, I misunderstood the question. I thought you were running two different versions of Windows, 32bit and 64bit. But, my basic answer still stands. It’s likely that due to how Windows runs 32bit apps on a 64bit OS. There are a variety of ‘redirections’ happening under the hood. This may help you understand: https://docs.microsoft.com/en-us/windows/desktop/winprog64/file-system-redirector