This is most likely due to file redirection. You have a 64-bit machine, but from the 32 Delphi process, Windows\system32 actually redirected to Windows\Syswow64 . Therefore, when you think that you are requesting the existence of a file in Windows\system32 , the system actually reports the existence (or otherwise) of the file in Windows\Syswow64 .
If you really need to see a true 64-bit system32, you need to disable file redirection. You can do this with the Wow64DisableWow64FsRedirection() function. Remember to enable it again with Wow64RevertWow64FsRedirection() . Beware that disabling the redirector has a wide coverage effect and can lead to very strange behavior, so do this with caution.
source share