How to hack shell32.dll

Discussion in 'Desktop Customisation' started by mavis, Jan 11, 2002.

  1. mavis

    mavis Guest

    First of all, I have attached a picture of my desktop showing "My Computer" so you can see an example... I just figured out how to do this tonight so the icons I picked aren't perfect, but I just wanted to show you guys that it could be done.

    Below are instructions. You will need an icon editor like Microangelo and you will need reshack.exe (if you don't know where to get these, press the "Search" button at the top of this page and look.):)

    As always, make sure you backup your original files!!! I am not responsible for any damage to your system, although I should mention that it didn't cause any problems for me...


    1. copy shell32.dll (in the C:\WINDOWS\system32 folder) and paste to desktop.

    2. rename to shell32.icl

    3. open with Microangelo Librarian

    4. extract the icon you want to replace (drag it to your desktop)

    5. paste shell32.dll to desktop again, and don't rename it (you can erase shell32.icl at this point) - THIS IS IMPORTANT!! DO NOT SIMPLY RENAME THE .ICL BACK TO .DLL

    6. locate the icon you are going to replace the default icon with

    7. open the extracted (original) icon in Studio (Microangelo Studio)

    8. open the replacement icon in Studio

    9. copy the 16x16, 32x32, 48x48 WinXP icons (alpha-blended) from the desired icon to the respective places in the extracted icon from shell32.dll/.icl

    10. save your changes :)

    11. I don't know if this step is necessary, but I added this line to filelist.xml:
    If you need help with this step, check here.

    12. delete the backup copy of shell32.dll from System32dllcache (see above link for instructions)

    13. open up reshack.exe, and with it, open the copy of shell32.dll that you pasted to your desktop

    14. click "Action" then "Replace Icon" and select the icon you wish to replace from the list on the right

    15. On the left, click "Open file with new icon" and browse to the icon you extracted from the original shell32.dll, the one that now has the updated WinXP (alpha-blended) icons. Click replace.

    16. click "File|Save As" and save it as shell32.dll - the one on your desktop

    17. browse your computer to C:\WINDOWS\system32, and rename the shell32.dll to shell32orig.dll. Now, drag the modified shell32.dll from your desktop to this folder. Windows will display a warning about replacing system files, click Cancel when asked to insert your WinXP installation CD, then click Yes to replace the original file.

    You're almost done!! Now, just open up TweakUI and on the left, select "Repair" - click "Repair Now" and voila!! All done.



    edit: ok, here's an update. I've rehacked my shell32.dll a few times since I wrote this tutorial, and it works perfectly every time... The only thing is, sometimes the changes don't take effect until after a reboot, then running the TweakUI icon rebuilder a second time. Don't ask me why, it's kinda weird - anyway, if you follow the tutorial, and your changes don't appear, simply reboot and run TweakUI's Icon rebuilder again and it should be fine (in my experience anyway) :) Happy hacking!
  2. Lonman

    Lonman Bleh!

    VERY kewl! good work. :D
  3. mavis

    mavis Guest

    thanks Lonman!!! :) I was happy to have figured it out... lol

  4. AndyP

    AndyP OSNN Senior Addict

    mmmmm, nice one:) ..about to test it out:)
  5. Shifty

    Shifty Guest

    cant get mine to work

    I read and followed your directions that you had, but im confused with a couple of steps about using microangelo... i just copied my shell32.dll to my desktop, opened it in the library program and replaced the icons. from there I saved, renamed the shell32 in my system32 folder, and copied the modded version over. before that i also changed the filelist.xml accordingly. after copying over the modded shell32 and repairing the icons with tweakui, i still cant get it to change my icons.
    i also deleted the shell32, in the dllcache folder.

    I have no clue why its not working.
  6. mavis

    mavis Guest

    if you opened shell32.dll using librarian, and then simply saved that file and used it to replace the original shell32.dll, you missed a very important step. You need to use reshack.exe to open the shell32.dll - it's not as easy as simply replacing the icon in Librarian.

    I am assuming you didn't use reshack.exe only because you didn't mention having used it... :) Follow those instructions I posted above (step by step!) and it will work.


    ps you may have to reboot to get the changes to "stick" - for some reason I had to reboot to see my changes last night, but only after I had hacked shell32.dll like 3 times without rebooting, lol...
  7. Otto

    Otto Guest

    Certainly is an awful lot of trouble to go to.. Try this to change icons per drive.. bit simpler:

    1. Put the icon you want to use on the root of the drive.
    2. Create an autorun.inf file on the root of the drive and put this in it:


    Change "icon.ico" to the name of your icon.
    3. Reboot or do whatever to get it to reload the icons.

    Done and done. Autorun isn't just for CD's anymore.

    If the drive is removable, you can do all sorts of other things with it too, check this web page for details on how to use the autorun.inf file:
  8. mavis

    mavis Guest

    thanks for the tip Otto... we actually had tried the autorun method (Lonman's original post) but it didn't work for CD drives... only hard drives...

    Does your way work for CD drives? If so, it certainly is much easier than my method! :) But it looks like the same suggestion that we have already tried... it only works with hard drives. The way I suggested actually works with any drive, and for that matter, probably almost any WinXP default system icons... However, another (easier) method would be awesome! (I should add, another easier method not involving the purchase of a third party app...) lol

  9. Otto

    Otto Guest

    If you put it on the root of the CD drive, then it should work just fine.. However, you're right, you wouldn't be able to use this for CD's you don't burn yourself.

    BTW, where did you get those cool drive icons? I want 'em! :D

    Also, that file doesn't have to be an "icon". It can be anything with icons in it. Like a DLL or an EXE file. You can reference a more specific icon by including its index like thus:


    For the third (or fourth, I dunno if it starts at zero) icon in the file.
  10. mavis

    mavis Guest

    cool post, thanks!!

    As far as where I got my icons from, I posted a thread here:

    Basically I got most of the icons from, and simply compiled them into a .dll - there are some newer ones that aren't included in that original file (the one I link to for download in that thread) but I am working on getting the various artists' permission to distribute them, just like last time (see the last post in that thread for details, and a screenshot of some new icons)... also has a lot of cool icons, but often you have to sift through mountains of posts to find them... :) Anyway, cool stuff. Now, the lastest thing I'm gonna work on when I have time are these icons: G4 folders.jpg
    i wanna replace the default "folder" icon in WinXP with the second icon on the top there... "Plain Folder" - cool huh?
    gonna replace my hard drive, and CD drive icons with the G4 icons on the bottom, left...

    Now I just gotta figure out how to port, cuz they're all OSX icons... :) Once it's done, I will compile everything to one great big .dll, located conveniently in my "My Documents" folder - should be around 15MB - it's already at 9.5MB with 1600 icons, or something like that... Then I'll re-hack my shell32.dll, and when it's all done I will forget all about it and just play games again (like I had originally intended to use my computer for) lol

  11. mavis

    mavis Guest

    ok I did it! got the World of Aqua III icons ported, and re-hacked shell32.dll...

    Matches my desktop! :)


    ps see? the tutorial does work!! lol
  12. Otto

    Otto Guest

    Not sure how useful this is, but it might come in handy:

    You know how when you go to "Customize this folder" and it says it will let you change the icon for the folder for all views except thumbnails? Well, that's a dirty, dirty lie. You can change the thumbnail view too.

    Create an icon using your favorite icon editor. I don't know exactly what formats of icons you need in there, but, I created an icon with 64x64, 32x32, and 16x16 for 32bpp, 24bpp, and 8bpp. (that's 9 versions of the same icon in one file). Save that icon file somewhere (as an .ico file) and then pick the icon from the customize this folder. What this does is to create a desktop.ini file in that folder with the following:


    The desktop.ini must have system and hidden attributes set, and the attributes of the folder must be read only. The Customize icon does all this for you. Anyway, with the right kind of icon, it changes the thumbnail too. Here's a screenshot I did using a drive bay icon just for kicks. The "New Folder" really is a folder, not a drive. ;)

    Anyway, if you want to customize individual folder icons, this might help you. :D

    When Windows picks an icon to display, it picks the one that most closely matches the color depth and resolution it needs. But for some reason, even if you have 32bpp color, it doesn't like to use that one unless the other lower bpp versions exist in the file as well. I tried it with just the 3 32bpp versions and it didn't work right. Thumbnails=64x64 icons, icon view=32x32, list view=16x16.
  13. mavis

    mavis Guest

    awesome man! Thanks for the tip!

    Actually I never use thumbnail view (except for my pic folders of course) but I might switch one over just to check it it out - good job!!

  14. that rules thx for the info too cant wait to try this out !!!
  15. existenz

    existenz Guest


    Mavis over-ICONS his computer this time ;)
  16. mavis

    mavis Guest

    hmm... is that even possible? :) Just wait until I get my hands on those mmicons - then we can talk about "over-iconing" a system... lol


    btw i noticed your avatar - are you a TOOL fan? I love that group!! Got to see them in August, live at the Paramount Theatre here in Seattle - from the FRONT ROW!! Yeah, my buddy's gf won front row tix on the radio and she gave them to us... it was SWEET!!! We were originally supposed to be like 30 rows back... lol
  17. existenz

    existenz Guest

    Yeah, I like TOOL's music!!

    haha, sweet. i've never gotten front row in a concert :eek:

    me love lateralus! :D
  18. DinaMoe

    DinaMoe Guest

    I'm having trouble with some of the steps in the tutorial. Can someone help me out please?

    steps 7,8,9 are the ones...

    actualy, 7 I'm cool with. I can open up the original-extracted icon. #8 says "open the replacement icon in Librarian". Does that mean in another instance of Librarian or in the same one that I opened the original with?

    And #9. I'm not completely stumped, but could you go into it with a little more detailed instructions? I'm having trouble with this step mainly because of step #8. So maybe when I get that, I'll be able to do this step right.

    Thanks for any help!
  19. mavis

    mavis Guest

    wow! Thanks for pointing that out DinaMoe... The program to use for steps 7-9 is "Studio" - Microangelo Studio, not Microangelo Librarian...

    What a tool, I'm gonna go edit that tutorial - sorry about that.


    ps once you're using Studio (you'll have both icons open, the original and the desired replacement) just select from the list/thumbnails on the right, the proper icons (ie "16x16 WindowsXP," "32x32 WindowsXP," etc) - then simply copy and paste them from the desired replacement to the original - so now your original will have the new WindowsXP format icons, in all the correct sizes, leaving the other formats alone (ie 32x32 256 color, etc) - you only want to replace the WindowsXP format icons... get it?
  20. well im going to give this a shot i want wicked kilelr icons too :d