Change default exe file icon

I read that I have to add these lines to my .au3 file:

 #Region #AutoIt3Wrapper_Icon=C:\myicon.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Res_Fileversion=1.0 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Run_Obfuscator=y #EndRegion 

I placed myicon.ico in the C:\ directory.

Then I right-click on my .au3 file and click Compile , everything is fine, but by default the icon is still an AutoIT icon.

+4
source share
2 answers

This is one of the things that bothered me the compilation process for quite some time. This does not work if you right-click your file and Compile.

You need to go through the Start menu> "AutoIt v3"> "Compile" Script to .exe. After selecting a script, you will see that your settings are loaded into the graphical interface.

enter image description here

+10
source

You can create a batch script package to compile AutoIt.

For instance:

 @echo off set FOLDER_CURRENT=%cd% set VERSION=v0.xxx set STATUS=prod set NAME_PROJECT=nameProject_%VERSION%_%STATUS% set EXE_OUT=%NAME_PROJECT%.exe set FOLDER_SRC=%FOLDER_CURRENT%\..\src\ set FOLDER_OUT=%FOLDER_CURRENT%\%VERSION%\%NAME_PROJECT% set ICON_PATH=%FOLDER_SRC%\images\icon.ico set AUT2EXE_ARGS=/in "%FOLDER_SRC%\main_script.au3" /out "%FOLDER_OUT%\%EXE_OUT%" /icon "%ICON_PATH%" echo ----[Compilation with aut2exe]---- aut2exe %AUT2EXE_ARGS% echo ----------------------------------- 

In this batch of script you can do more things like:

  • Create Output Directory
  • Copy all necessary directories and ressources files (images, icon, ...)
  • Create another file
  • Close the output folder to simplify deployment.
  • Press release on git server
0
source

Source: https://habr.com/ru/post/1391744/


All Articles