DLL Hacking - Modifying your shell32.dll

Grandmaster

Electronica Addict
Political Access
Joined
3 Feb 2002
Messages
10,574
Images and Links FIXED!
Modifying your shell32.dll

Introduction

Modifying your shell32.dll has become THE way for complete system customisation. What is your shell32.dll? It is the dll that contains most of Window's XP's icons. You could say it is the 'core' of Windows XP's icons. With this tutorial you will learn to modify your shell32.dll. This tutorial was made so that even 'newbies' can follow and understand, and the focus will be on changing icons. Also, if you already do not know, the operating system used here is Windows XP.

We are going to use Resource Hacker to modify your shell32.dll. So you are probably thinking to yourself, I could just do this in a more easy and quick way with a third party program such as Microangelo or Axialis IconWorkshop. But the truth is, most people cannot afford such software, and you learn a lot more this way. Plus this was the way I first customised icons my pc, and still do.

Some benefits of modifying your shell32.dll, using Resource Hacker:

* You do not need to invest in expensive software, in order to change icons on your pc.
* This is especially useful becaue, after you have made to changes to a particular dll file, you can save it for future use, so that you will not have to hack that particular dll file again. For example, on my computer I have several different dll files that are 'themed' with certain icon sets, such as MMX Mercury , Snow.E 2 , Crystal, or G.A.N.T. So when I feel like I want to use Crystal, all I have to do is just replace the current shell32.dll I am using, with my hacked one. Ten minutes later, if I want to use Snow.E 2, all I have to do is replace the Crystal dll with my Snow.E 2 dll.

Some disadvantages:

* The task may be a bit daunting for un-experienced users.
* There is ALWAYS a possibility that your pc will not function properly if you carry out this tutorial. Although this is highly unlikely, back up your data before attempting any dll modification.
* The process can consume a lot of your time, but the the advantages greatly outweigh this.

So let me say this again: BACKUP YOUR DATA. I, or ntfs.org cannot be held liable to any data loss that might occur. So lets begin.You can click on any of the screenshots in this tutorial to view a larger version.

Part 1 - Getting ready

You will need the following to start:

* Download Resource Hacker. This is an excellent freeware program that lets you view, modify, rename, add, and delete resources from win32 executables and resource files. In simple terms: this the the program you will use to modify your dll files.
* You also need an extracting utility like WinRAR. Since most icons come in packs, they are often compressed into formats such as .zip or .rar.
* Download some icons. Some good places are deviantart.com, deskmod.org, or visit any other site that you know of.
* You may want to get this that I have, so you can view all the icons within the most common dll file that is hacked, the shell32.dll. Use it as a reference as most dll's contain hundreds of icons.
* Print this tutorial out, as you might want the instructions for the part where you reboot in Safe-Mode with Command Prompt.
* Like I said before, backup your data.

Note: If you have already downloaded your shell32.dll, at this point you can proceed to "Part 3- Save, Replace, Enjoy".

Part 2 - Modify it!

1.) First of all, extract your icons. Go to your My Documents folder, and make a folder called 'My Icons'. Now, extract your icons into that folder. If you are having trouble using winzip, or winrar, look at this screenshot. Your icons are now ready to be used for dll hacking.

2.) Lets get Resource Hacker ready. The file comes in .zip format. If you are having trouble with this, look at this screenshot. After you have extracted resource hacker, double-click on 'ResHacker.exe'. This will start Resource Hacker.

2.jpg

http://ofg.osnn.net/images/dllhacking/2.jpg

3.) With Resource Hacker open, press Ctrl+O. This will bring up a dialog box. Where it says 'File Name' type in "x:\windows\system32\shell32". Replace the x with the drive name where windows xp is installed on your pc.

4.jpg

http://ofg.osnn.net/images/dllhacking/4.jpg

4.) Now press, enter. This will open up the shell32.dll. Your screen should look something like this:

5.jpg

http://ofg.osnn.net/images/dllhacking/5.jpg

Since we are replacing the icons in the shell32.dll, click on the '+' by by the 'Icon Group' folder. Remember, the 'Icon Group' folder, not the 'Icon' folder.

6.jpg

http://ofg.osnn.net/images/dllhacking/6.jpg

5.) Here is where the list of the icons in the shell32.dll I have comes in. If you did not download the list earlier, you can get it here. First think about what icon you want to replace. Then, using Find in notepad, locate its number. For example, if I wanted to replace the Network Drive icon, then I would go to Edit -> Find... and then I would search for 'Network Drive'.

Now I know that the icon number for Network Drive is 10.

7.jpg

http://ofg.osnn.net/images/dllhacking/7.jpg

Go back to Resource Hacker, and go to the icon number. In my case, it was the number 10.

8.jpg

http://ofg.osnn.net/images/dllhacking/8.jpg

Now that you have located the icon that you want to change, lets go on to the next step. Now, with the '1033' selected, go to

Action > Replace Icon ...

9.jpg

http://ofg.osnn.net/images/dllhacking/9.jpg

And you should get something like:


10.jpg

http://ofg.osnn.net/images/dllhacking/10.jpg

6.) This is when we replace the icon. Click on the 'Open File with new icon...', this will bring up an Open dialogbox. We now want to go to where you extracted those icons. Find an appropriate icon to replace the icon you want to replace.

This will what your screen might look like:

11.jpg

http://ofg.osnn.net/images/dllhacking/11.jpg

Click on 'Replace'. Make sure you have the right icon selected though. If you see a little hand instead of the icon you wanted do not worry. Do the same procedure for every icon that you want to replace. The icon in place of the old one might look like a a hand, but don't worry about that.

12.jpg

http://ofg.osnn.net/images/dllhacking/12.jpg

Part 3- Save, Replace, Enjoy.

1.) Go to File -> Save As ..., and save your modified shell32.dll with the name 'shell32_modified.dll', in the following directory: x:\windows\system32\shell32. Replace the x with the drive name where windows xp is installed on your pc.

Because windows is always using the shell32.dll(even as your reading this), you will need to replace your current shell32.dll outside of windows. The easiest way to do this is to:

* Reboot
* Press F8 as windows boots up (Right before the windows xp boot screen).
* Choose 'Safe Mode with Command Prompt' as your option.
* Once you login, type in 'cd..' and then type that in again.
* Type in 'cd windows/system32
* Type in 'ren shell32.dll shell32_original.dll'
* Then type in 'ren shell32_modified.dl shell32.dll'
* Reboot

Now, login to Windows and enjoy your new, modified shell32.dll!

Conclusion

Using this technique, you can replace various AVIs, bitmaps, and cursors too. You can also use this same technique to modify other dlls.

Comments? Suggestions? Questions?
 
Last edited:
Excellent tutorial, o_87! :)
Very well and systematically written, and the screenshots make it easy even for a first-time user. Great job!
 
Two more things to add:
1) Just wondering - do you need to boot into Safe Mode with Command Prompt in order to rename shell32.dll? I know that the file is locked and can't be deleted, but it looks like it can be renamed.
I usually just rename shell32.dll to shell32_orig.dll while in Windows, click Cancel when the SFC warning pops up, rename the new file shell32.dll, cancel another SFC warning, and then rebuild my icon cache using TweakUI.

2) Would it be possible for you to upload the shell files that you've already created, and link to them so that it saves time if others want to use the same set of icons?

Again, thanks for taking the time to create such a detailed tutorial.
Definitely worth it. :)
 
Thanks NetRyder :)

I actually had that tutorial written a while ago..originally it was supposed to be part of my site. So I saw a thread and Chris was asking how to use the umions shell. I remembered about this thing, had to edit it a bit, converting it from html to use in VBCode was a PITA though. :)

Two more things to add:
1) Just wondering - do you need to boot into Safe Mode with Command Prompt in order to rename shell32.dll? I know that the file is locked and can't be deleted, but it looks like it can be renamed.
I usually just rename shell32.dll to shell32_orig.dll while in Windows, click Cancel when the SFC warning pops up, rename the new file shell32.dll, cancel another SFC warning, and then rebuild my icon cache using TweakUI.

2) Would it be possible for you to upload the shell files that you've already created, and link to them so that it saves time if others want to use the same set of icons?

1. Well sometimes that works for me, sometimes it does not. But the Safe Mode technique works 100% of the time so I included that. Plus on OEM versions of Windows you have to do it the way I wrote.

2. I was thinking about this, however a while back my harddrive crashed and I lost all of the ones I had :(, however it is possible, and I would be willing to. I would need to gather all the shells in order to do so. And then there's the issue of distribution. Most artists do not like it at all if you distribute their icons without their permission. However, if you ask, they are usually very nice would let me. I think the best way to do it would be to go around looking for shells that have already been allowed to be distributed, and then ask the artists if I can upload them to my server to be downloaded. If worst comes to worst, we can always posts links to shells that have recieved permission.
 
Originally posted by o_87
Thanks NetRyder :)

1. Well sometimes that works for me, sometimes it does not. But the Safe Mode technique works 100% of the time so I included that. Plus on OEM versions of Windows you have to do it the way I wrote.

Thanks for clearing that up. :)

Originally posted by o_87

2. I was thinking about this, however a while back my harddrive crashed and I lost all of the ones I had :(, however it is possible, and I would be willing to. I would need to gather all the shells in order to do so. And then there's the issue of distribution. Most artists do not like it at all if you distribute their icons without their permission. However, if you ask, they are usually very nice would let me. I think the best way to do it would be to go around looking for shells that have already been allowed to be distributed, and then ask the artists if I can upload them to my server to be downloaded. If worst comes to worst, we can always posts links to shells that have recieved permission.

That's a shame. :(
I see what you mean about the permissions though. I'll see if I can find some shell files around as well.
 
Thank you so much. I had posted this question over at Spammers a few days ago (as to how to change the icons). Thank you again.
 
I'v seen this and asked about this a couple of times on sites like "Neowin" & "Hardwaregeeks" and ended up getting pretty good answers and doing what I wanted. This is the first time I have seen this on "NTFS" and its the best and most easily read one ever, nicely put and explained! It even has pictures! o_87, you did an amazing job!!
 
the link that has the list of what the numbers in the shell aer in the icon form is dead (hope that came out right)
 
@mike09: You are right, somehow the file got deleted from my server (?), but it is back up now. :)

@Chris: You probably still saw it because of your cache.
 
theres already a thread like this before, i think it was done by mavis "the icon god", when NTFS.org reconstructed the site the thread was lost (or was it remove intentionally?), i would be glad if they bring that section back, i think it would be best under themes & graphics section.
 
it use to be like this, it was a bit different and conserning other topics aswell. This one is much better than before, but mavis should add anything if there is something!
 
Originally posted by prinsipe
theres already a thread like this before, i think it was done by mavis "the icon god", when NTFS.org reconstructed the site the thread was lost (or was it remove intentionally?), i would be glad if they bring that section back, i think it would be best under themes & graphics section.

Well, the topic, along with the entire icons and graphics section got deleted by accident :S So we lost a lot of stuff, including mavis's topic. Plus, mavis's tutorial had missing images, and was a bit dated, and he has nto been on the forums for months.

A few people were asking in a thread how to do this, and I had a tutorial written a while back, but it was never used. So I just posted it here. :)
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back