Running under Windows 64-bit Edition

AutoIt has traditionally been a 32-bit application. With the v3.2.10.0 release, native x64 versions of some components have been added, including:

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).

You can run the x86 version of AutoIt by right-clicking a script and selecting "Run Script (x86)".

To see if you are running under a x64 edition of Windows use @OSArch macro, like-wise to see if you are using the 32-bit or 64-bit version of AutoIt use @AutoItX64.

Running the 32-bit version of AutoIt on a x64 System

For Files, Windows has a special redirection mechanism for some system directories :

Directories 32-bit Value 64-bit Value
@SystemDir @WindowsDir & "\System32" @WindowsDir & "\SYSWOW64"
@ProgramFilesDir {SystemDrive} & "\Program Files (x86)" {SystemDrive} & "\Program Files"

It's possible to access the 64-bit version of those directories by disabling the redirection mechanism.

@@SyntaxHighlighting@@ #include _WinAPI_Wow64EnableWow64FsRedirection(True) @@End@@

Additional information can be found at MSDN.

For registry interaction, use HKCR64 or HKLM64 to bypass the redirection mechanism see Registry Functions documentation.