Google Answers Logo
View Question
 
Q: Extract edit and reinsert an Icon ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Extract edit and reinsert an Icon
Category: Computers
Asked by: lenh-ga
List Price: $10.00
Posted: 03 Jun 2004 16:32 PDT
Expires: 03 Jul 2004 16:32 PDT
Question ID: 356125
Need the ability in a WIN XP system to extract an icon from an 'exe'
file, edit the icon and then return the edited icon back into the same
'exe' file.  If which 'exe' file I have in mind matters - it is
regedit.

Thanks for any assistaance.

Leonard Herr
Answer  
Subject: Re: Extract edit and reinsert an Icon
Answered By: sublime1-ga on 03 Jun 2004 21:07 PDT
Rated:5 out of 5 stars
 
Leonard...

Download a copy of Resource Hacker - software by Angus Johnson,
here:
http://www.users.on.net/~johnson/resourcehacker/

I suggest making a copy of regedit.exe and moving it to another
directory while you work on it. You can always rename the 
original file to regedit.old, replacing it with your new version
later.

You may encounter a message saying there's been an error when
you go to replace regedit.exe. This is just Windows trying to
protect the file, and you can ignore the message.

If Windows insists on rewriting the file, you may have to 
replace it while in Safe Mode.

Once you've downloaded ResourceHacker, open it, point it
to the regedit you've saved in another directory, and open
it.

Go to the Icon folder in the tree to the left. The icon you
probably want to modify is number 1, but you can select any.

With the 1033 of the icon you want selected, then go to 
the menubar up top, click on Action -> Save [icon : 1 :1033],
and save it to somewhere you can find it.

At this point you can edit the icon file (.ico) using any
icon editor. MicroAngelo is the most well known:
http://www.microangelo.us/

There's a 21-day free evaluation download here:
http://www.microangelo.us/dlcreation.asp

Edit the icon to your satisfaction and save it where you can
find it.

Open ResourceHacker again, and open regedit with it,
go to the icon you're going to replace, and select it.
Click on Action -> Replace Icon, and browse to your
modified icon, select it, and voila!

You now have a copy of regedit with a custom icon.

No research was necessary, as I know the processes and
the resources from past experience.


Please do not rate this answer until you are satisfied that  
the answer cannot be improved upon by way of a dialog  
established through the "Request for Clarification" process. 
 
A user's guide on this topic is on skermit-ga's site, here: 
http://www.christopherwu.net/google_answers/answer_guide.html#how_clarify 
 
sublime1-ga

Request for Answer Clarification by lenh-ga on 04 Jun 2004 13:50 PDT
Everything worked fine through the extracted icon editing and opening
resourcehacker and the moved regedit file to replace the icon - then
nothing in your procedure worked as expected after clicking on
Action/Replace Icon in the moved regedit.

How do I browse to my modified icon?, by windows explorer
or by the resourcehacker window that opens and says to open file
with new icon-which when I use this method to select it by clicking
on the location and the the edited icon it does NOT show up in the
'select new icon window' and I then have no displayed icon to select
and no modified icon in regedit - when I use windows explorer to go to
the edited icon (ignoringing the respourcehacker 'replace icon in'
window) and do the selecting at that location I still don't get a
modified icon in regedit.]

Any suggestions would be appreciated.

Leonard Herr

Clarification of Answer by sublime1-ga on 04 Jun 2004 15:58 PDT
Leonard...

How do I browse to my modified icon?, by windows explorer
or by the resourcehacker window that opens and says to open file
with new icon-which when I use this method to select it by clicking
on the location and the the edited icon it does NOT show up in the
'select new icon window' and I then have no displayed icon to select
and no modified icon in regedit - when I use windows explorer to go to
the edited icon (ignoringing the respourcehacker 'replace icon in'
window) and do the selecting at that location I still don't get a
modified icon in regedit.]

Well first, it might help to know which icon you want to replace.
Where do you want the modified icon to appear? I pointed you to
icon 1 in the list to the left of ResourceHacker because that's
the one that will be used to identify the file in Windows Explorer.
It's also the one that will appear at the top left of the program
window when you open regedit. This seemed likely, so that's the
one I pointed you to.

To replace that icon with the modified one, open ResourceHacker,
and open the copy of regedit with it, go to the icon you're going
to replace in the tree under the icon folder (1) , and select it
(the 1033 symbol, not the folder). Click on Action -> Replace Icon.
[I left out the following step, which I thought would be obvious.]
In the dialog box which results from clicking on Action -> Replace
Icon, select the icon in the right side of the dialog window that
you're going to replace (100 is the same as the number 1 icon,
and there's a visual display to let you see which one you select).

Then click the button 'Open file with new icon' and browse in
the dialog explorer window to your modified icon. It won't show
up in the window under 'Select new icon', but the icon and path
you've selected will show up under the 'Open file with new icon'
button, and the 'Replace' button, at the bottom right of the window,
which was greyed out, will now be functional. Press the Replace
button and ResourceHacker switches you down to the 'Icon Group'
folder to reflect the changes you've made. Go back up to the 
Icon folder and the new icon should be there instead of the one
you replaced.

If you replaced the #1 icon, this is the one used to represent the
file in Windows Explorer. You may have to go to View -> Refresh
in order to see the change in Windows Explorer. If you replaced
the #1 icon, you will also see the new one at the top left of 
the program window when you open the modified regedit. 

This worked just fine for me. I just replaced the 100 icon (#1)
with the 101 icon (#2), refreshed Explorer, and now it shows up
next to the file, and on the top left of the program window when
I run that copy of regedit.

If I can make it any clearer, just let me know.

sublime1-ga

Clarification of Answer by sublime1-ga on 04 Jun 2004 16:20 PDT
Oh, and just in case it's not obvious, when you close ResourceHacker
after making the changes, it will ask if you want to save the changes.
Of course, say yes to preserve the changes. You can also go to File
-> Save As, and select the file you're working on and replace it,
or save the modified file with a new name, like regedit2.exe.

sublime1-ga

Request for Answer Clarification by lenh-ga on 04 Jun 2004 19:21 PDT
will try again and let you know - although it probably isn't relevant
I am replacing icon #9 - the 'open file folder' icon

Request for Answer Clarification by lenh-ga on 04 Jun 2004 19:53 PDT
Used revised info exactly and still no replacement - possible because
I am trying to replace icon #9 and the options after Action/Replace
Icon doesn't list a '109' icon or anything ending in 9 but the listed
204 icon does display the 'open folder' icon that was earlier selected
as #9.

Does this sound like the problem?

Clarification of Answer by sublime1-ga on 04 Jun 2004 20:14 PDT
When I do this: "open ResourceHacker,and open the copy of regedit
with it, go to the icon you're going to replace [9] in the tree
under the icon folder, and select it (the 1033 symbol). Click on
Action -> Replace Icon", the dialog box opens with the 204 icon
already highlighted. I guess you could select it again, with your
mouse, just to be sure, but yeah, 204 is the icon to replace.
Don't forget to save your work when you exit.


I suspect that changing that one will be visible in regedit when
you open it and double-click a folder to the 'open' position. 
Then you'll see your modified icon instead of the standard open
folder icon.

sublime1-ga

Request for Answer Clarification by lenh-ga on 05 Jun 2004 13:05 PDT
Have tried every suggestion very carefully and cannot edit and replace
the open folder icon in regedit.  While I appreciate your comments and
patience I would like to ask if you have been able to personally edit
and replace the open folder icon in regedit.

Clarification of Answer by sublime1-ga on 05 Jun 2004 15:00 PDT
Leonard...

I don't have an icon editor, but I have been able (in less than
five minutes after reading your last clarification request) to
use ResourceHacker to extract a different icon of the same size
(ordinal name 4 - blue cubes on white paper background, listed
as the second icon, 16 x 16, under 'Icon Group' 101). I then
replaced the open folder icon (ordinal name 9, listed under
'Icon Group' 204, and also 16 x 16), using the one I extracted.

Having saved my work, I opened the modified regedit.exe, and 
everywhere you would expect to see an open folder, there was
the other icon, with blue cubes on white paper, instead.

If you need me to repeat the exact instructions for the 
process above, I can do so, but the directions are not 
in any way different from what I've already given you for
extracting and replacing the icons.

Perhaps you could try doing the process above to see if
you can successfully replace an icon using a pre-existing
icon of the same size. If you are able to do that, then
perhaps the problem lies in the results of your editing.
Maybe the product of your editing is no longer 16 x 16
pixels, and is therefore not integrating into the program.

sublime1-ga

Request for Answer Clarification by lenh-ga on 06 Jun 2004 10:45 PDT
Thanks for your patience.  All working OK.

Leonard Herr

Clarification of Answer by sublime1-ga on 06 Jun 2004 12:24 PDT
Leonard...

Thanks very much for the rating and the tip.
I'm very pleased to hear that you were able to accomplish
your goal, and I'm sure you'll find ResourceHacker to be
of use in the future. It's really an excellent program.

Best regards...

sublime1-ga
lenh-ga rated this answer:5 out of 5 stars and gave an additional tip of: $15.00
Excellent response - Responder was very patient and persued question
to a very successful completion.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy