Jump to content

Compile single file for both 32 bit and 64 bit?

Recommended Posts

I see there's an x64 check box to compile for 64 bit platforms and unchecking will compile for 32 bit; is there a way to compile a single file that will work on both platformes (Windows 7 Ultimate)? So far I haven't been able to use one exe for both types of machines. The script is small anyway so size isn't an issue, I would like to manage only one file rather than two if possible? Any suggestions?

Thanks :D

Link to post
Share on other sites

Hi I just compile 32bit exe's but take care when either messing with the registry or system directories.

For example.

Have a look at ttp://msdn.microsoft.com/en-us/library/Aa384187 which describes windows redirection

So you could put something like this at the top of your code and then just use $SystemDir throughout the code

If @OSArch = "X64" and @AutoItX64 <> 1 Then
$SystemDir = @WindowsDir & "Sysnative"
$SystemDir = @SystemDir

and for accessing the registry put something like this when declaring variables and use $HKCU etc throughout your code if/when you access the registry

If @OSArch = "X64" And @AutoItX64 <> 1 Then
Edited by norry
Link to post
Share on other sites

Download latest beta of AutoIt3Wrapper and use this to compile both versions:


or this workaround

#AutoIt3Wrapper_Run_Before=del /f /q "%scriptfile%_x64.exe"
#AutoIt3Wrapper_Run_Before=del /f /q "%scriptfile%_x86.exe"
#AutoIt3Wrapper_Run_Before=""%autoitdir%aut2exeaut2exe.exe" /in "%in%" /out "%scriptdir%%scriptfile%_x64.exe" /nopack /x64"
#AutoIt3Wrapper_Run_After=ren "%out%" "%scriptfile%_x86.exe"



Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...