Einzelnen Beitrag anzeigen

devidespe

Registriert seit: 7. Sep 2006
Ort: Berlin
434 Beiträge
 
Delphi 10.4 Sydney
 
#9

AW: FileExists liefert False, obwohl die Datei vorhanden ist

  Alt 10. Aug 2010, 13:46
Versuch mal C:\Windows\Sysnative\WinSAT.exe
Das Verzeichnis Sysnative existiert nicht.

Hast du mit dem (64 bit) Explorer geguckt oder mit deinem (32bit) Delphiprogramm?
Ich habe den Total Commander verwendet, und der listet i.d.R. mehr auf als der Windows-Explorer. Die Suchfunktion arbeitet präziser als die indexbasierte Windowssuche.

Mittlerweile habe ich im Embarcadero-Forum (https://forums.embarcadero.com/threa...threadID=39757) eine Lösung gefunden.

Edit:
Und zwar liefert die MSDN (http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx) die passende Begründung:

32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32. WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access. This mechanism is flexible and easy to use, therefore, it is the recommended mechanism to bypass file system redirection. Note that 64-bit applications cannot use the Sysnative alias as it is a virtual directory not a real one.

Das bedeutet, dass ich unter 64 Bit-Windows-Versionen anstatt auf C:\Windows\system32\WinSAT.exe
nun auf C:\Windows\Sysnative\WinSAT.exe zugreifen muss.

Abschließend noch die Frage, ob dieses Verhalten auch bei Vista x64 zutrifft?
Devid
57 65 72 20 6C 65 73 65 6E 20 6B 61 6E 6E 2C 20 69 73 74 20 6B 6C 61 72 20 69 6D 20 56 6F 72 74 65 69 6C 21

Geändert von devidespe (10. Aug 2010 um 14:00 Uhr)
  Mit Zitat antworten Zitat