Sign in to follow this  
Followers 0
jbennett

Change AutoIT .exe icon

26 posts in this topic

Hi,

Got a quick question..

How do i change the AutoIT .exe icon?

thanks

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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
1 person likes this

Share this post


Link to post
Share on other sites

Maybe he want to change AutoIT.exe icon.

AutoIT.exe icon, get it?

I mean, he is... read the nick :P


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

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

I think you can use reshacker with its -delete command for deleting desired icons (after compilation).

Share this post


Link to post
Share on other sites

I think you can use reshacker with its -delete command for deleting desired icons (after compilation).

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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Heres the default .exe icon grabbed from shell32.dll

shell32_3.ico


global $warming = true

Share this post


Link to post
Share on other sites

I wish I could just have a default icon like this and add it but the icons on vista are different and it doesn't really work well.

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
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!"

Share this post


Link to post
Share on other sites

@Jos & @GEOsoft: Thanx a lot. Icon-cache really was the problem.

Share this post


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
Sign in to follow this  
Followers 0