A Photography forum. PhotoBanter.com

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PhotoBanter.com forum » Digital Photography » Digital Photography
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do you edit an icon in one of the Windows system DLLs?



 
 
Thread Tools Display Modes
  #11  
Old June 17th 20, 02:27 AM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Paul[_10_]
external usenet poster
 
Posts: 64
Default How do you edit an icon in one of the Windows system DLLs?

Mayayana wrote:

It wouldn't be possible to edit an icon in a system file
due to permissions.


Think how much an OS hates it when you do that :-)
Windows File Protection, signed system files (loader
can detect that the signing is invalid). Trying to
do that while Windows Defender is watching. It'll be
the HAL9000 all over again.

People have been trying to do this since uxtheme.dll
in Windows XP.

But if you need a hobby...

If you succeed, you'll be famous. You might even
end up with your own wanted poster.

Paul
  #12  
Old June 17th 20, 03:05 AM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Paul in Houston TX[_2_]
external usenet poster
 
Posts: 15
Default How do you edit an icon in one of the Windows system DLLs?

Arlen Holder wrote:
Two fundamentally basic Windows icon-editing questions:
(A) How do you edit an icon in one of the Windows system DLLs?
https://i.postimg.cc/43GKMY2Z/icon01.jpg
(B) Do you know _why_ the icon *changed* when viewed as a "large icon"?
https://i.postimg.cc/mrVr58FN/icon-ico.jpg
I was building a new shortcut for a multi-killswitch just now...
TARGET=%comspec% /c %Windir%\System32\taskkill.exe /im "prog1.exe" /t /f & %Windir%\System32\taskkill.exe /im "prog2.exe" /t /f

Where the icon I liked was inside the Windows system32 DLL:
%SystemRoot%\System32\SHELL32.dll

Only I wanted to overlay the classic angled red stripe across it.
o So I screenshotted it as a "large" icon so I could edit it as an ICO file

Lo and behold...
o https://i.postimg.cc/43GKMY2Z/icon01.jpg

The glove icon _changed_ right under my very own eyes!
o It was a "globe" when viewed as a small icon...
o It it _changed_ to a "dual-pane" when viewed as a larger icon.

Why?
o Has that ever happened to you?

Why does Windows do that?
o Have you noticed Windows _changes_ the icon depending on viewing size?

Anyway, I wasn't able to get the small icon large without it changing, so I
proceeded to use the large icon (which is a completely different icon!)
just to test the proof of concept of creating the icon from inside the DLL.
(1) I displayed the icon using "large icons" (which changed the icon!)
(2) I screenshotted it and opened it up in Irfanview freeware for edit
(3) In Irfanview I cropped with control+y & with control+shift+y
(4) In Irfanview I resized to 32x32 pixels as per the thread below
(5) I added a red stripe (which was the original goal)
(6) And I saved it as a *.ico icon file format from Irfanview
https://i.postimg.cc/mrVr58FN/icon-ico.jpg

Notice, in a sense, I failed to edit the original icon, so, the question
remains apropos as to whether you can tell me, and the rest of us so that
all benefit, how you would change the original globe icon from inside the
Windows system DLL.


Resource Hacker, system32.dll, icon group 200, the biggest one
is 48x48, Ordinal name 2317 and 2320. So now you know the names.
Go up to Icon and open 2317 or 2320 and save as icon.
I used to replace them on XP. Have not tried on 7 or 10.

  #13  
Old June 17th 20, 03:39 AM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Arlen Holder[_6_]
external usenet poster
 
Posts: 47
Default How do you edit an icon in one of the Windows system DLLs?

On Tue, 16 Jun 2020 22:49:31 -0000 (UTC), Arlen Holder wrote:

The only remaining question is that of "transparent background"...


SOLVED:
By experimentation, I was able to easily transparize icon backgrounds.

All you have to do is tell Irfanview to save the ico file with a
transparent background and that's it (the PNG transparent background didn't
work).

Your main freeware photo editor has to handle ico files with a transparent
background, where mine didn't, but that was ok because Irfanview can pretty
much read anything & then save that as an ico with transparent background.

The icon I chose to edit & then transparize is the "magnifying glass" icon:
o %SystemRoot%\System32\SHELL32.dll {shell32_22_4.ico}

It was so easy, I'll just show the screenshots to illustrate the steps:
o https://i.postimg.cc/K8Rj3yYs/icon09.jpg
o https://i.postimg.cc/YSFS8fY6/icon10.jpg
o https://i.postimg.cc/cHMLGxD6/icon11.jpg
o https://i.postimg.cc/Df6wCzJM/icon12.jpg
--
Note, since this was a test, I didn't bother matching the sizes of the old
to new icon, which changed slightly in size between before & after editing.
  #14  
Old June 17th 20, 04:03 AM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Arlen Holder[_6_]
external usenet poster
 
Posts: 47
Default How do you edit an icon in one of the Windows system DLLs?

On Tue, 16 Jun 2020 21:05:39 -0500, Paul in Houston TX wrote:

Resource Hacker, system32.dll, icon group 200, the biggest one
is 48x48, Ordinal name 2317 and 2320. So now you know the names.
Go up to Icon and open 2317 or 2320 and save as icon.
I used to replace them on XP. Have not tried on 7 or 10.


Thanks for the advice to try resource hacker freewa
o http://angusj.com/resourcehacker/

The high cost of freeware is in two things:
a. Finding the best (which takes advice from helpful folks like you)
b. Testing them out (which is kind of sort of what I like to do)

On their web site, they document the same (or similar) icon as mine:
http://angusj.com/resourcehacker/rh_icon.png
http://angusj.com/resourcehacker/rh_main_menu.png

So others can just click, the version 5.1.7 exe is apparently he
o http://angusj.com/resourcehacker/reshacker_setup.exe

And the ZIP file apparently he
o http://angusj.com/resourcehacker/resource_hacker.zip

From just skimming the web page, this seems like a powerful tool.
o With uses far beyond editing of icon ico files.

However, apparently, with Resource Hacker, we can export the icon files out
of the system DLLs, which we also did with the tested Icon Explorer.

Hence, I think, if I understood correctly in my skim of the resource hacker
web page, the related added value is we can likely use it to IMPORT our
modified icon back into the Windows system DLL, although that may cause
permission issues (which Paul and others mentioned M$ might not like).

I installed Resource Manager, and clicked about, and opened up the file
%SystemRoot%\System32\SHELL32.dll but was unsuccessful and gave up after a
minute or two as about the only thing that I can't (yet) do is _add_ the
newly modified icon to the original Windows system DLL, which might not
work anyway.
--
The extremly high cost of freeware is in effort needed to find the best!
  #15  
Old June 17th 20, 09:57 AM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
wasbit[_2_]
external usenet poster
 
Posts: 7
Default How do you edit an icon in one of the Windows system DLLs?

"Mayayana" wrote in message
...
"Big Al" wrote
snip


It wouldn't be possible to edit an icon in a system file
due to permissions. What one can do is to make an
icon and then assign that to a shortcut. In addition
to Greenfish, there's IcoFX that I use. I don't know
whether it's still free. IcoFX can also make a multi-image
ICO file. I like to take an image and then paste that into
an icon editor and work from there. It's much easier to
start with something like a reduced-size face than to draw
a face using one pixel at a time.


Icofx last freeware version 1.6.4
- http://www.321download.com/LastFreew...e40.html#IcoFX

Regards
wasbit

  #16  
Old June 17th 20, 01:11 PM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Mayayana
external usenet poster
 
Posts: 1,514
Default How do you edit an icon in one of the Windows system DLLs?

"wasbit" wrote

| Icofx last freeware version 1.6.4
| - http://www.321download.com/LastFreew...e40.html#IcoFX
|

Ah. Nice to know some things don't change every year.
That's the same version I have.


  #17  
Old June 17th 20, 01:20 PM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Mayayana
external usenet poster
 
Posts: 1,514
Default How do you edit an icon in one of the Windows system DLLs?

"Paul in Houston TX" wrote

| Resource Hacker, system32.dll, icon group 200, the biggest one
| is 48x48, Ordinal name 2317 and 2320. So now you know the names.
| Go up to Icon and open 2317 or 2320 and save as icon.
| I used to replace them on XP. Have not tried on 7 or 10.
|

For anyone who's interested, I wrote a VBScript some
years ago to extract icons:

https://www.jsware.net/jsware/scrfiles.php5#iconextr

It's fairly basic. You can extract a single icon or
compound ones. The download has a help file that explains
it. The extraction doesn't use system APIs or anything similar.
Rather, it directly reads the file bytes to find the resource
section, then copies out the relevant bytes, then reconstitutes
the icons based on the data found there. The icons are
stored as bitmaps and lack only a small file header to get
the full ICO file. The script checks the size and then adds
in the appropriate header. You can just drop something like
shell32.dll onto the script (if you have permission for drag/drop)
and it will recreate all the icons in a few seconds. No system
file permissions are needed and there's no risk because the
script only reads the file bytes, without attempting to edit
the file or call functions in the file.


  #18  
Old June 17th 20, 01:31 PM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Mayayana
external usenet poster
 
Posts: 1,514
Default How do you edit an icon in one of the Windows system DLLs?

A couple of notes I should mention about the icon extractor:


1) Look at the .html help file. A minor edit to choose
extraction path is required before use.

2) I haven't tried the extractor with 64-bit files. It
can work fine, but offhand I'm not sure whether it would
need to be adapted to deal with 64-bit pointers. It
depends on what changes Microsoft may have made
(or not) to the 64-bit file header. A PE file header (EXE,
DLL, OCX) is very complex and parsing it requires walking
various series of pointers: Read bytes at offset x to find the
offset y, which will be the start of a 4-byte pointer
that indicates the offset of the beginning of the bytes
that make up the resource table.... and so on. The
icon extractor was written to deal with the 1-, 2- and
4-byte numeric values stored in a Win32 PE header. There's
no reason to add 8-byte numeric values, but MS could have
done that as part of the Win64 redesign. If they did then
the extractor might need to be edited to produce a 64-bit
version.


  #19  
Old June 17th 20, 08:05 PM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Arlen Holder[_6_]
external usenet poster
 
Posts: 47
Default How do you edit an icon in one of the Windows system DLLs?

On Wed, 17 Jun 2020 09:57:24 +0100, wasbit wrote:

Icofx last freeware version 1.6.4
- http://www.321download.com/LastFreew...e40.html#IcoFX


Hi wasbit,

Thanks for that purposefully helpful suggestion for others.
o You have to get the right (old) version, as you noted.

So that everyone always benefits, I dug up my notes on icofx:
o Everything below is from my old notes in my software archives.

===
Dropbox link to an old freeware version of IcoFX.
https://www.dropbox.com/s/g6ge41cpulnqzps/icofx_164_setup.exe?dl=0

Name: icofx_164_last_freeware_setup.exe
Size: 1541684 bytes (1505 KiB)
SHA256: 19B79CAE2FAC4372DCE4DCC6FB001B97A30ADF68835303DA28 336734267AA5FA

http://www.portablefreeware.com/foru...ic.php?p=40061
which implies this is the last known freeware available
and that the original author says he's OK with it being available.

Most on that page seem to say the MD5 hash of 1.6.4.0 is
MD5 069E5551B7DEEE6F37833E8930E66A34 17.11.2008 21:15

Which is said to be here
http://www.321download.com/LastFreew...e40.html#IcoFX
===
Also...
http://www.lupopensuite.com/db/icofx.htm
certutil -hashfile IcoFX.exe MD5
MD5 hash of IcoFX.exe:
14aeada479ae59ef3248c9f8c2befbf0
CertUtil: -hashfile command completed successfully.
===
--
On Usenet, the purposefully helpful people add value to the thread.
  #20  
Old June 17th 20, 08:05 PM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Arlen Holder[_6_]
external usenet poster
 
Posts: 47
Default How do you edit an icon in one of the Windows system DLLs?

On Wed, 17 Jun 2020 08:11:40 -0400, Mayayana wrote:

That's the same version I have.


So that others benefit from our actions, where we always keep in mind that
the high cost of freeware can be lowered when others provide their advice,
here is my ad hoc log file, from long ago, when I tested icoFX trialware.

IcoFX version 3.2.1 (30-day trialware)
https://www.icofx.ro/downloads.html
===
https://www.icofx.ro/files/icofxsetup.exe
Check custom installation
C:\Program Files (x86)\icofx3
Associate IcoFX with the ico/cur file extension
===
It wants to go into C:\Program Files (x86)\icofx3
I put it instead into C:\app\editor\icon\icofx
===
https://icofx.ro/tutorials3/index.html
https://icofx.ro/tutorials3/tut5.html
===
000 I installed https://www.icofx.ro/files/icofxsetup.exe 30-day trialware
001 I downloaded https://i.imgur.com/sk2SYH6.png
002 I saved as C:\Users\user\Desktop\sk2SYH6.png
003 I started IcoFX version 3.2.1 30-day trialware
004 IcoFX:File, Open, C:\Users\user\Desktop\sk2SyH6.png
Create a Windows icon from the image
005 IcoFX:File, Save, C:\Users\user\Desktop\gitfolder.ico
006 IcoFX:Tools, Icon Resource Editor, Add, C:\Users\user\Desktop\gitfolder.ico
007 IcoFX:Tools, Icon Resource Editor, Save, C:\Users\user\Desktop\myicon.icl
008 IcoFX:Tools, File, Exit

I was able to set the icon of a shortcut to that one icon.
Shortcut: Properties, Change Icon, %USERPROFILE%\Desktop\gitfolder.ico,
(select the one icon), OK, OK

Notice I used the "ico" and not the "icl", which only works because you can
put a single icon into an ico file (apparently) but if you want more icons
than just one, you need to put them into an "icl" icon library.

To add a second & third icon to an "ICO" library, I picked these files
https://www.tenforums.com/geek/gars/...sic_folder.png
https://winaero.com/blog/wp-content/.../01/before.png

I saved "thumb_usic_folder.png" as C:\Users\user\Desktop\music.png
I saved "before.png" as C:\Users\user\Desktop\lock.png

Back in IcoFX, I added those two icons to the myicon.icl library.
001 I started IcoFX version 3.2.1 30-day trialware
002 IcoFX:File, Open, C:\Users\user\Desktop\music.png
Create a Windows icon from the image
003 IcoFX:File, Save, C:\Users\user\Desktop\music.ico
004 IcoFX:File, Open, C:\Users\user\Desktop\lock.png
Create a Windows icon from the image
005 IcoFX:File, Save, C:\Users\user\Desktop\lock.ico
006 IcoFX:Tools, Icon Resource Editor, Open,
C:\Users\user\Desktop\myicon.icl
007 IcoFX:Tools, Icon Resource Editor, Add,
C:\Users\user\Desktop\music.ico
008 IcoFX:Tools, Icon Resource Editor, Add,
C:\Users\user\Desktop\lock.ico
009 IcoFX:Tools, Icon Resource Editor, Save,
C:\Users\user\Desktop\myicon.icl
010 IcoFX:Tools, File, Exit

I was able to set the icon of a shortcut to one of those three icons.
Shortcut: Properties, Change Icon, %USERPROFILE%\Desktop\myicon.icl
(select any of the three icons), OK, OK
===
If you need icons, you can mine any of these native Windows files:
C:\windows\system32\shell32.dll (default icon location)
C:\windows\system32\imageres.dll (folders, devices, actions)
C:\windows\system32\ddores.dll (hardware devices and resources)
C:\windows\system32\pifmgr.dll (old-style icons of Windows 95 vintage)
C:\windows\system32\inetcpl.cpl (old-style icons of Windows 95 vintage)
C:\windows\system32\moricons.dll (old-style icons of Windows 95 vintage)
C:\windows\system32\mmcndmgr.dll (old-style computer management icons)
C:\windows\system32\accessibilitycpl.dll (accessibility features icons)
C:\windows\system32\mmres.dll (audio speakers, headphones, microphones)
C:\windows\system32\netcenter.dll (network settings and features)
C:\windows\system32\netshell.dll (network connections & hardware)
C:\windows\system32\networkexplorer.dll (network connections & hardware)
C:\windows\system32\twinui.dll (twin screens icons)
C:\windows\explorer.exe (file explorer icons)
C:\windows\system32\gameux.dll (gaming icons)
C:\windows\system32\mspaint.exe (paint-related icons)
--
The high cost of freeware is mainly in finding & installing only the best.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 10 - Day 1 + How to get classic start icon? Mort[_3_] Digital Photography 6 July 9th 16 09:25 PM
Windows freeware to edit & create EXIF data for JPEG photos Crusader Digital Photography 23 July 10th 07 07:09 PM
How do RAW image viewing dlls work? PrashantP Digital Photography 2 October 30th 05 07:02 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital SLR Cameras 22 May 10th 05 11:15 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 7 May 5th 05 09:22 PM


All times are GMT +1. The time now is 08:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PhotoBanter.com.
The comments are property of their posters.