AutoIt 原先是一个32位应用程序. 当在 3.2.10.0 版本发布时添加了内部 x64 版本支持, 包括:
During installation, if AutoIt is found to be running on an x64 system then you will be given the choice to install and configure the x64 versions. These versions are fully x64 compatible, however, some scripts that use DllCall/DllStruct with custom structures may use values that break 64-bit compatibility (such as using 32-bit integers for pointers). This includes some of the UDFs supplied with AutoIt as they have not all been tested under x64.
You can run the x86 version of AutoIt by right-clicking a script and selecting "Run Script (x86)".
If you suspect that a script is not working correctly under x64 but it works under x86 then please report a bug.
To see if you are running under a 64-Bit edition of Windows use @OSArch macro. To see if you are using the 32 or 64-bit version of AutoIt use @AutoItX64.
For Files, Windows has a special redirection mechanism for some system directories :
Directories | 32-bit Value | 64-Bit Value |
---|---|---|
@SystemDir | @WindowsDir & "\SYSWOW64" | @WindowsDir & "\System32" |
@ProgramFilesDir | {SystemDrive} & "\Program Files (x86)" | {SystemDrive} & "\Program Files" |
It is possible to access the 64-bit version of those directories by disabling the redirection mechanism.
DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
更多信息请参考 MSDN.
For registry, use HKCR64 or HKLM64 to bypass the redirection mechanism see Registry Functions documentation.