ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Pull icon from exe and put on the containing folder

(1/4) > >>

kunkel321:
I have a Portable setup on my work computer (not sure if that's relevant to the request).  As seen in the back window, I have a PortableApps folder.  For the most part, there is a subfolder for each portable app.  And--mostly--each folder has an exe in it of the application, for example Calibre Portable in the front window.  I was simply going through and manually customizing the folder by navigating to the exe file and choosing the first image that is compiled in it.  That way, the folder has the same image as the application in it.  I figured that could be automated with AHK, or some other language...

I guess the rules would be:
-look inside of folder for the first exe file found.
-look for first icon resource in that found exe file.
-set the folder's icon to be that icon resouce.

IDEA:  Pull icon from exe and put on the containing folder

Any takers?   :P

mouser:
That's a nice idea.. I have some code to pull an icon from an exe.. Wouldn't be too hard to do adapt the code, but hopefully a standalone tool already exists for this?

skwire:
That's a nice idea.. I have some code to pull an icon from an exe.-mouser (February 09, 2021, 01:05 PM)
--- End quote ---

There's no need to extract the icon as this is done via hidden "desktop.ini" files within the folder in question.  Here's a sample:


--- Code: Text ---[.ShellClassInfo]IconResource=C:\path\to\program\program.exe,0[ViewState]Mode=Vid=FolderType=Generic
https://hwiegman.home.xs4all.nl/desktopini.html

kunkel321:
Interesting.  So what you'd need to do I guess is just identify the path of the exe, then edit the 'desktop.ini.' 

Edit to idea/request:
As I look through my subfolders, I see that some of the applications have secondary exe files in with the main application.  Often those have different icons.  As such, the "first" exe found is not always the correct one.  Perhaps the solution to this, would be to find the exe that has the same name as the folder.  Unfortunately, the exe's name is often slightly different. 

Maybe it would make sense to navagate to the correct exe, then select it and activate the tool (via hotkey I guess).  The tool would then get the path to that exe, then edit the parent folder's desktop.ini folder... 

EDIT:  On a related, but different topic:  About 10 years ago, a fellow named Kilmatead, made a tool in AutoIt for customizing folder icons.  It is here
https://forum.zabkat.com/viewtopic.php?f=22&t=8816
I just checked and the download still works.  And the app works on my current Win 10 laptop. 

Lots of options.  Sadly Kilmatead disappeared from the forums years ago and is assumed, either dead, or abducted by aliens. 

MilesAhead:
If you wish to do this with a lot of folders it may be worth checking out a macro record/playback utility.  If you select the exe in the folder then start recording mouse actions and keystrokes you could play it back on other selected exe files.  In my W10 explorer shift right click brings up the context menu that has "copy as path."  After clicking that pressing Alt up arrow will move you up in explorer so that the containing folder is selected.  Right click and click Customize tab, then click Change Icon.   Click browse button.  Now you can paste in the path of the exe that is in the clipboard.

If you only have a hundred or so folders you wish to customize, assuming the macro playback works, you could do 10 at a time until they are all customized.  If you have hundreds of folders then yes you may want to try to find a dedicated utility somewhere.

Navigation

[0] Message Index

[#] Next page

Go to full version