Jump to content

A curious, intermittent problem with aut2exe\aut2exe_x64


Mbee
 Share

Recommended Posts

I'm experiencing a very strange but intermittent problem when I try to build my x64 code.  Most of the time everything works fine, but randomly and fairly frequently I'll get the following error messages:  First, a popup error box: "Error: Unable to add resources."  Then the following at the bottom of SciTE:

Aut2exe.exe ended with errors because the target exe wasn't created, abandon build. (C:\Users\mjb\AppData\Local\AutoIt v3\Aut2exe\~AUAE9.tmp.exe)rc:2

(it actually ran aut2exe_x64.exe).  What makes this so strange is that, every time this happens, if I change nothing at all and simply perform the build again, it almost always works fine again (though sometimes I have to try more than once).  Now, I'm aware that anti-virus and other protection tools can cause this kind of error, but not only have I turned all of them off but the fact that it'll work fine again next time pretty much proves that kind of thing isn't at fault this time.

This isn't catastrophic, obviously, just puzzling and mildly annoying.

Edited by Mbee
Link to comment
Share on other sites

Anti-virus or shared folder issue.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • Developers

Did you exclude the temp directory "C:\Users\mjb\AppData\Local\AutoIt v3\Aut2exe\"  from your Anti Virus software?

Jos

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

Not only that, but I completely disabled it and my firewall (which also watches for various violations).  And again, if it were related to either of these, why does it work perfectly when I simply build again?

Link to comment
Share on other sites

Are you using a OneDrive or similar type folder?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • Developers

There has to be a process on the computer that locks the file at the time AUT2EXE creates the temp binary and tries to update the PE Header's resource info.

Jos 

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

12 minutes ago, Jos said:

There has to be a process on the computer that locks the file at the time AUT2EXE creates the temp binary and tries to update the PE Header's resource info.

Jos 

I see, whatever it is, that other process can be active intermittently which explains why it sometimes works correctly.  I'll look for such.

Thanks!

Link to comment
Share on other sites

I face he same problem when compiling, so I need to disable Windows Denfender Antivirus an reenable it after it the produce .exe is ok for the antivirus !!!

Edited by jpm
Link to comment
Share on other sites

  • 1 month later...

I just ran into this issue: from zero to frequent (approaching constant) compilation failures in just a few days. All my individual programs compile fine, but when I try to build the installer, Aut2Exe gets blocked and bails out. That's probably b/c the installer-generator takes a script template, a zip archive, and a checksum file and compiles it all into an executable with the 2 files embedded in it. The AV software produces a false positive after concluding the compiler is generating malware. So now our project is dead in the water w.r.t to building and testing our software until we get a solution. (And this is after I had to find a workaround for Windows thinking the installer was malware when it executed; cranking up the compression on Aut2Exe did the trick - for now.)

Unfortunately, in a corporate environment it's not always easy to disable AV software, add exceptions, etc., and the IT folks may not be able to do a lot about it; depends on how rigid the security software configuration is and how rigid the company policies turn out to be. (The new network security software blocked access to the second network on my computer, which I need for testing. Etc.) Security is very important, but we also need to be able to do our jobs and the customers happy.

When the going gets tough, the tough start coding.

Link to comment
Share on other sites

@jpm Thanks for the suggestion; will try it out.

It looks preferable to removing the FileInstall() calls and shipping the currently-embedded files as external files.

(We don't currently ship the AutoIt interpreter, but if that will dig us out of this hole, it would be a reasonable approach.)

When the going gets tough, the tough start coding.

Link to comment
Share on other sites

@jpm

I'm not sure I understand your suggestion. Currently, we avoid touching the Registry, although some installers for 3rd-party software might modify it.

We also have another problem: if we want to change the installation disc contents to have a different number of files with different names, we have to put a new installer-launcher program on the system before we can use the new-style disc. The current launcher expects an exact number of files with certain names, otherwise it won't run the installer.

So, I would prefer to continue using our current method, where we embed the product software files into the installer.exe program file using FileInstall(). But first we have to be able to compile the installer.

When the going gets tough, the tough start coding.

Link to comment
Share on other sites

it was just a sugestion if you want that the AutoIt installer have a restriction on .au3 file.

If you just install AutoiT .au3 and .a3x file will be allowed to be executed.

Link to comment
Share on other sites

You can include binary files without using FileInstall.  Have a look at willichan's Inline Binary Files UDF.  It creates an AutoIt script file with the file in the script as a binary string, with functions to convert it back to a file.  You can then use the file with the returned path.    

 

Adam

 

Link to comment
Share on other sites

@AdamUL

I don't think the Inline Binary UDF approach is going to fly because one of the files I'm embedding is a 40MB Zip archive.

The .au3 file generation test I'm doing right now has been running for over 16 minutes and it's only about 10% of the way through the Zip file, so the time to complete will probably be several hours, and that's before compiling the installer. Using FileInstall(), the installer compiles in a minute or two with the same size Zip file.

Edit: The InlineMe test ran for over 24 hours and still wasn't done when I had to reboot the machine. I estimate it was about 75% of the way through the Zip file.

I'm still hoping to get the necessary exception(s) needed to use FileInstall(). Failing that, there are other methods I may pursue.

Thanks anyway.

Edited by tremolux66
Adding info

When the going gets tough, the tough start coding.

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