Jump to content

[Solved] "%autoitdir%\aut2exe\aut2exe.exe" not working properly


UEZ
 Share

Recommended Posts

When I try to use

#AutoIt3Wrapper_Run_Before="%autoitdir%\aut2exe\aut2exe.exe" /in "%in%" /out "%scriptdir%\%scriptfile%_x64.exe" /nopack /x64

it will not work because %autoitdir% has blanks in the path name.

SciTE output:

> Running:"C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe" /in "E:\AU3\Test01.au3" /out "E:\AU3\Test01_x64.exe" /nopack /x64
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

But when I start it in CMD it is working! -> "C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe" /in "E:\AU3\Test01.au3" /out "E:\AU3\Test01_x64.exe" /nopack /x64

Here the full code:

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

If @OSArch = "X86" Then
    MsgBox(0, "CPU", "CPU is x86", 10)
Else
    MsgBox(0, "CPU", "CPU is x64", 10)
EndIf

Any idea how to get it work?

Br,

UEZ

Edited by UEZ

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 comment
Share on other sites

  • Developers

try:

#AutoIt3Wrapper_Run_Before=""%autoitdir%\aut2exe\aut2exe.exe" /in "%in%" /out "%scriptdir%\%scriptfile%_x64.exe" /nopack /x64"

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Your example is flawed, @OSArch will return the version of your OS, I think you want @AutoItX64.

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

If @AutoItX64 = 0 Then
    MsgBox(0, "AutoIt", "AutoIt is x86", 10)
Else
    MsgBox(0, "AutoIt", "AutoIt is x64", 10)
EndIf

@Jos, yes that works! :graduated:

Link to comment
Share on other sites

try:

#AutoIt3Wrapper_Run_Before=""%autoitdir%\aut2exe\aut2exe.exe" /in "%in%" /out "%scriptdir%\%scriptfile%_x64.exe" /nopack /x64"

Thanks Jos, that was the solution!

Your example is flawed, @OSArch will return the version of your OS, I think you want @AutoItX64.

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

If @AutoItX64 = 0 Then
    MsgBox(0, "AutoIt", "AutoIt is x86", 10)
Else
    MsgBox(0, "AutoIt", "AutoIt is x64", 10)
EndIf

@Jos, yes that works! :graduated:

It was only a test to compile x86 and x64 with same script in one step. So forget the MsgBox stuff - it is nonsense :(

Br,

UEZ

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 comment
Share on other sites

Your example is flawed, @OSArch will return the version of your OS, I think you want @AutoItX64.

That changed a long time ago

@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

It was only a test to compile x86 and x64 with same script in one step. So forget the MsgBox stuff - it is nonsense :D

Br,

UEZ

So then it should have been:

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

MsgBox(0, "What time is it?", "Party time!! :P", 10)

:graduated:

That changed a long time ago

I don't get your point. I say that @OSArch returns the OS architecture. You say that @OSArch returns the OS architecture. Is it "repeat other people at random"-day today? :(
Link to comment
Share on other sites

Perhaps we should revisit your post that I quoted

Your example is flawed, @OSArch will return the version of your OS, I think you want @AutoItX64.

I thought you may have been thinking of @OSVersion or @OSType.

@OSType Returns "WIN32_NT" for NT/2000/XP/2003/Vista/2008/Win7/2008R2.

@OSVersion Returns one of the following: "WIN_2008R2", "WIN_7", "WIN_2008", "WIN_VISTA", "WIN_2003", "WIN_XP", "WIN_XPe", "WIN_2000".

Generally I will use @OSArch as follows

If StringInStr(@OSArch, "64") Then
    ;; Do something here
EndIf
Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

People can also refer to x86 and x86-64 as different versions. Since x86-64 is just an extension of x86 you could even say that x86-64 is a later version of x86.

All that talk about @OSArch and @AutoItX64 should have implied CPU-architectures, not Windows name (that @OSVersion and @OSType mostly is). I'm sorry if I mislead you, but we are really talking about the same thing.

:graduated:

As UEZ's questions has been answered I'm leaving this thread now :(

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...