Jump to content
Sign in to follow this  
KaFu

ICU - Icon Configuration Utility [Updated 2013-May-24]

Recommended Posts

KaFu

ICU - Icon Configuration Utility

130111_ICU_1.jpg

Current Version: v5.0 (2013-May-24)

Restore your desktop when the icons get "rearranged".

Melba23 and I found we were working on very similar ideas to restore the Desktop icons to their normal place if they became "rearranged" (). Vista seems to like this doing on occasion just for fun - but we all know some apps and games which change the display resolution or move icons around. This annoys "tidy" people who like their desktops arranged "just so" - I am particularly thinking of this desktop when I say that! :D

We combined efforts and here is the result of our labors.

Operation is easy - press "Save" to store a particular configuration and "Restore" to reset the icons to the saved positions in the selected configuration file. "Delete" allows you to remove unwanted configuration files from the list. There is a command line option so that the restoration can be run via HotKeys if required (that is why the script warns that it should be compiled for full functionality). You can decide what to do with any icons that have been added since you last saved the configuration file - the default is to put them in the top-left corner, but you can also banish them way off-screen or, more sensibly, specify a location for them.

A new feature as of ICU v3.4 is the optional Desktop Contextmenu Integration (DCI) for Win7 (Win7 only because Microsoft implemented an easy way to do this through the registry as of this release).

Version 3.3 should fix the empty save file bug

Version 3.4 Win7: Admin rights no longer needed for DCI

Version 5.0 Win8 compatibility for DCI

The source and executable can be downloaded from my site: http://www.funk.eu

Kudos to Ascend4nt, Melba23, Prog@ndy, & Valik for parts of the code.

Please let me know if you found some piece of code in the source for which I forgot to mention a credit.

Enjoy, let me know what you think of ICU and with Best Regards

Edited by KaFu

Share this post


Link to post
Share on other sites
Zedna

Nice!

I used WinTidy for restoring desktop icons all the time but it doesn't work on Win7.

So I will try this your utility definitely.

This week it was mentioned also on Czech main technical site which is one of the most accessed sites here:

http://www.zive.cz/

http://www.zive.cz/clanky/svet-na-plose-...ou-aplikacich/sc-3-a-159626/de

You can look at it in English trough online Google translator :-)

http://translate.google.com/translate?sl...plikacich%2Fsc-3-a-159626%2Fde

:D

EDIT: It's mentioned there no matter of missing Czech translation so it's great success!

Edited by Zedna

Share this post


Link to post
Share on other sites
KaFu

Glad it comes in handy!... and nice to know it hit the czech market too :oops:. What really peaked my website's traffic was this article on lifehacker.com and this article on techline.hu, so even the bigger sites mostly only do copy&paste :D...

Share this post


Link to post
Share on other sites
UEZ

It is working properly!

Thanks for sharing it!

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
TheSaint

Once again, thanks for sharing! :D


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
KaFu

2011-Nov-27, Changelog 3.3 > 3.4

  • Win7: Admin rights for Desktop Contextmenu integration no longer needed
Source and Executable are available at

http://www.funk.eu

Best Regards

Share this post


Link to post
Share on other sites
KaFu

2012-Jan-11, Changelog 3.4 > 3.5

  • Tweak GUI
  • Changed Desktop file location detection
  • Speed-Up Start of ICU
Source and Executable are available at

http://www.funk.eu

Enjoy :) and Best Regards

Share this post


Link to post
Share on other sites
Tankbuster

Hello,

thank you for this great tool.

May I raise a RFC?

I downloaded your source and added a msgbox autolose option.

In the ICU.INI I added

[Settings]
Desktop_Contextmenu_Integration=0
MsgBox_AutoClose=2

The MsgBox_AutoClose is added to all MsgBox calls.

example:

MsgBox(16 + 262144, $sGUITitle & " - Error _Save_Locations_Desktop()", "Desktop Window Handle not found.",$MsgBox_AutoClose)

Does this make sense for you?I use the ICU in an unattended way. (maybe no msgbox at all also an option when started from commandline?)

Anyway, I spread already your tool and the word. And all of the users are happy, to get a weapon against the Funny-MS-occasional-time-desktop-Icon-rearrangements now.

Share this post


Link to post
Share on other sites
KaFu
KaFu
KaFu

Well, after exactly one year here's the latest update on ICU...

2013-Jan-11, Changelog 3.5 > 4.0

  • Added new method for “Unkown Icon” handling: Top-Left|Bottom-Right|Custom Position|Ask per Icon|Off-Screen
  • "Custom Position" and "Ask per Icon" now work by selecting new position with mouse
  • Added new command line parameters (see “About” in program for details): restore, autosave, save, savereplace
  • Replaced several MsgBoxes with Tray Notifications
  • Added “Duplicate” config function
  • Enhanced config list right-click contextmenu with some functions
Source and Executable are available at

http://www.funk.eu

Enjoy :) and Best Regards

Edited by KaFu

Share this post


Link to post
Share on other sites
KaFu

2013-May-24, Changelog 4.0 > 5.0

  • Improved Win8 compatibility (esp. Desktop Contextmenu Integration / DCI)
  • Added "minimized" command line switch (to start GUI minimized to tray / autostart with windows), see program "About" for details on command line switches
  • Added Tray Menu (esp. useful for Win XP) > see "minimized" switch. Also pressing ESC or minimizing the program will send ICU to the system tray now
  • Added "toggle" command line switch
  • Added "restore %resolution%" and "savereplace %resolution%" command line switches

     

Source and Executable are available at
http://www.funk.eu

Enjoy :) and Best Regards

Edited by KaFu

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  

  • Similar Content

    • mar3011
      By mar3011
      Hey, I have a problem I tried to look for it but it didn't solve the problem, I can't add an icon to the exe, I already know there were such topics I tried to all add exclusion C: \ Users \ Marcin \ AppData \ Local \ AutoIt v3 \ aut472.tm.exe to antivirus but after compilation, the name of the file changes, I uninstalled the anti-virus, but it didn't works, except that when I add the example icons from AutoIT it works, I downloaded icons using Firefox Developer Edition also don't works, just the downloaded graphics don't works also. Is there any solution to this problem?  
    • copyleft
      By copyleft
      I am trying to create a script to clean up users' desktops by moving all desktop folders and files (except the two hidden "desktop.ini" files and a MyDesktop.lnk shortcut) to a different folder. The script below will move files but not folders. The other issue with the script is that it doesn't seem to execute from a location other than the user's desktop. I would appreciate any suggestions.
      #include <File.au3> MsgBox(64, "Desktop", "Cleaning up Desktop. This box will close in 4 seconds.", 4) $Files = _FileListToArray(@DesktopDir,"*",1) For $Index = 1 To $Files[0] If StringRight($Files[$Index],4) <> ".ini, MyDesktop.lnk" Then FileMove($Files[$Index],'F:\HOME\Desktop') EndIf Next  
    • amimemeami
      By amimemeami
      I have learned how to use TraySetIcon icon and toggle between icons that I added as resources using 
      #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files (x86)\AutoIt3\Icons\au3.ico My current work around is 
      Doit() Func Doit() Local $TestIcon = @ScriptDir&"\Test.ico" Local $ProdIcon = @ScriptDir&"\Prod.ico" Local $Test = "Test" Local $Prod = "Prod" Local $Current = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\My Program","Location") If $Current = $Prod Then FileCreateShortcut($Test,@DesktopCommonDir&"\TestLink.lnky",Default,Default,"Test Link",$TestIcon) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\My Program",$Test) Else FileCreateShortcut($Test,@DesktopCommonDir&"\TestLink.lnky",Default,Default,"Test Link",$ProdIcon) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\My Program",$Prod) EndIf EndFunc I did a bit of quick cutting, from my working program. Basically it creates an link on the desktop, and then deletes it and creates a new one each time it is run. If you where wondering, I made it a .lnky file so that I could add a custom right click menu for it. 
      This example came from a something I am using to switch between prod and test environments, so the actual link created does not launch the script. You can right-click on the link and run the script to change environments. The icon lets me know at a glance which environment I am currently set for. 
       
      What I am trying to figure out is if there is a way to change the icon of the executable of the script only using the resources compiled within that script. What would be nice would be to have a ScriptSetIcon function.
    • elsemieni
      By elsemieni
      Hey hello.
      I came here with maybe too specific questions about uncommon things, but as people says, I don't lose anything trying to asking here 
      There's long time that I have a little "experimental" idea: Use windows desktop and it icon system like old videogame consoles (where "sprites" are used to draw things on screen, can be manipulated/animated to make interesting things happen). Some of that inspiration came from another experiments from demoscene.
      Researching the possibilities of doing something like that (maybe not so intense) I found that the Windows Desktop uses a GuiListView to show and arrange icons (and of course, AutoIt provides UDF's for that  ). So, I'm used that UDF to create dummy icons (not putting files on Desktop, just modifiying the "GUI layer" of desktop for put non-working icons), setting custom values like coordinates, name and Icon (from a list of loaded icons in the GuiListView).  As you can see in next image works well in Windows XP... even in Windows 95 (that's not the case from Windows Vista to 10, but I already posted another question here about that... anyways, for now I'm working that with a isolated XP machine... sigh).

      Another video doing an animation with that:
      How I make that custom icons? Here:
      $hWnd = ControlGetHandle("Program Manager", "", "[CLASS:SysListView32; INSTANCE:1]") $newItem = _GUICtrlListView_AddItem ( $hWnd, "TEST", 32 ) ; with an icon of index 32 _GUICtrlListView_SetItemPosition ( $hWnd, $newItem, 300, 300 ) ; set some example property. Put in X=300 Y=300 Okay, so the next phase was changing the icons with custom ones. And here starts the issues. As AutoIT help says, icons from GuiListView came from a loaded GUIImageList, which, seeing past images I conclude that it's already preloaded with some sort of most used icons (something like an icon cache?). But If I modify it (or create another GUIImageList and then put into the GuiListView) the icons became corrupted and replaced with blank ones. (can be reverted deleting IconCache.db, just like when windows shows wrong icons in desktop).
      How I change icons? Here
      $hImage = _GUIImageList_Create(48, 48, 5) ; create an image list for 48x48 icons $newIcon = _GUIImageList_AddIcon($imageList, @SystemDir & "\shell32.dll", 110) ; just adding a new icon in the image list _GUICtrlListView_SetImageList($hWnd, $hImage, 0) ; $hwnd is the desktop hwnd Another option as workaround for setting icons was getting the desktop GUIImageList, and modifiyng it directly. I otbtain a GUIImageList handle, but ... without any images inside! (That's strange beacuse, when I set desktop item icons without altering the GUIImageList, it applies correctly). And finally if I try to add new ones, it returns -1 with @error setted.
      How I'm trying to get  desktop GUIImageList? Here.
      $imageList = _GUICtrlListView_GetImageList ( $hWnd, 0 ) MsgBox(0,_GUIImageList_GetImageCount ( $imageList ), $imageList) ; getting image count and GUIImageList handle $newIcon = _GUIImageList_AddIcon($imageList, @SystemDir & "\shell32.dll", 110) ; adding icons without success So, what is the question? There's something wrong I'm doing while trying to set the new icon set on desktop? Or desktop icons work in different way than the rest of the GuiListView's? Or there's something really stupid that I can't saw before that corrupts the icons? 
      Also... if there's not known solution for that, do you have some idea for doing a workaround for that? Or another crazy idea? (Maybe putting real files instead dummy icons could be a solution ... a very slow one). Or even maybe (maybe not, I sure about that xD) do you want to help with this "experiment".
      Thanks in advance, have a good day  
×