Jump to content

Change AutoIT .exe icon


 Share

Recommended Posts

When you are running in SciTe, you can't. If you make a compiled script, you can select the icon you want when you compile. That is assuming you are using AutoItWrapper or Aut2Exe. You can run this app simply by the AutoIt menu off the Start menu, or from SciTe menu bar - Tools - Compile.

Link to comment
Share on other sites

If you use Scite4Autoit3 (AutoIt3Wrapper) then add this at top of your script

#AutoIt3Wrapper_icon=your_icon.ico

When you compile script (by F7 from Scite) AutoIt3Wrapper will change icon for you.

Icon must be in script directoy at compile time in this case.

Edited by Zedna
Link to comment
Share on other sites

How do I get it to show up as just a regular standard executable icon?

If you use an icon then it will be used as the icon for the file in File Excplorer. Is that what you mean?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

If you use an icon then it will be used as the icon for the file in File Excplorer. Is that what you mean?

I guess what I mean is how do I add no icon to my files during compilation? I don't want to add my own and I don't want the default autoit icon. I just want windows to give the default .exe icon to the file after its done compiling since it will have none of its own.

Link to comment
Share on other sites

I guess what I mean is how do I add no icon to my files during compilation? I don't want to add my own and I don't want the default autoit icon. I just want windows to give the default .exe icon to the file after its done compiling since it will have none of its own.

Every *.EXE file have it's own icon, and you can't compile a exe without a icon (if you will not specify than the default will be used).
Link to comment
Share on other sites

i tested it, after deleting icons of a exe file using ResHacker.exe the program gives a error.

That is probably because of UPX.

UPX is a compressor and after compressed you shouln't delete or modify anything that is compressed unless uncompressing before (and compressing afterward again if you wish).

Learn about compressors to see why.

...lots of "compress" in that two sentences.

Or you could trace the icon you are looking for, shell32.dll ICON_GROUP resource 3 if I remember correctly, and replace the AutoIt Icon with this.

Only that icon varies from system to system, and that's how he would have the same for all systems.

He could also extract that icon to some folder (SciTE folder for example) and modify HKEY_CURRENT_USER\Software\AutoIt v3\Aut2Exe, "LastIcon" key to match that location (this is from van der Zande's wrapper)

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

That is probably because of UPX.

UPX is a compressor and after compressed you shouln't delete or modify anything that is compressed unless uncompressing before (and compressing afterward again if you wish).

Yes, this was the problem. i forget to remove compression before editing... :P
Link to comment
Share on other sites

Yes of course it varies between system to system, but it will still be in roughly the same dll though! *Vista Unknown

Remember what you said about assumptions? You are assuming that the op has not the prescence

of thought to scroll down the icon list to find the one he wants.

Like your idea of modding the Aut2Exe LastIcon reg key though dude.

I didn't mean that Vista doesn't have that icon. It has it but looks somewhere different.

Exe with "no icon" looks different on Vista because that "resource 3" looks differently (green and stuff).

Btw, I'm using that method that you described with AutoItSC.bin ( AutoItASC.bin). And using #NoTrayIcon usually.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

I didn't mean that Vista doesn't have that icon. It has it but looks somewhere different.

Exe with "no icon" looks different on Vista because that "resource 3" looks differently (green and stuff).

Btw, I'm using that method that you described with AutoItSC.bin ( AutoItASC.bin). And using #NoTrayIcon usually.

Yeah I"m using this method now as well. I have one .bin with the icons and one without and switch between the two according to what I want.

Link to comment
Share on other sites

  • 2 years later...

Hi,

I used Aut2Exe also assigning another icon for the compiled script. The .EXE is stored in the same directory as the .au3 script, and when using explorer.exe to look at the directory, I also see the assigned icon representing the .EXE. So far, so good.

However, when I copy the .EXE to the Vista-desktop, I see the default icon. What is wrong here ?

Link to comment
Share on other sites

Run this script on the Vista box and see if it helps.

$sFldr = @UserProfileDir & "\AppData\Local"
FileChangeDir($sFldr)
If MsgBox(262193, "Proceed? ", "The Icon Cache will be deleted and the system restarted to rebuild it.", 10) = 1 Then
ProcessClose("explorer.exe")
While ProcessExists("explorer.exe")
  Sleep(50)
WEnd
If FileDelete("IconCache.db") Then
  Shutdown(18)
Else
  ShellExecute("explorer.exe")
EndIf
EndIf

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

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