Jump to content

Giving Your Windows Cosmetic Surgery


Recommended Posts

Updated: 10/11/03

Fixed: Typo in the bootlogo.cmd

Updated: 03/11/03

Added: msgina.dll Guide

Added: SFC Disable Guide

If you have any questions, comments or suggestions, please ask :)


To change your boot logo, default theme or to add themes that are able to be seleted by default (like the standard Windows Luna / Silver / Olive themes), then the first thing you need to do is patch your uxtheme.dll file.

Microsoft Windows won't allow you to install any themes that arent digitally signed by Microsoft. Its you're uxtheme.dll that does the checking. So to be able to add new themes to windows, we need a hacked version of this file, that will tell Windows that the themes that we are installing are infact digitally signed by windows. (which ofcourse they arent)

Before you continue, patch your uxtheme.dll by one of the following two ways.

1. Probably the easiest solution would be to download the uxtheme cab file extract it, and place it in your i386 directory.

2. Aaron XP has a guide to paching your uxtheme.dll on the Unattended XP guide website, and also has a download link for the hacked file. Follow this guide

Windows File Protection

If you're having problems getting some of these customizations to work, its most probably because of your Windows File Protection or WFP.

Whenever windows detects that a system file isnt the one that was packaged with Windows, then it attempts to replace the modified version, with the one off the Windows CD. This means, when you're installing your windows with your modified files in your $$\System32 directory, on the next boot, they will be replaced by the origional windows versions.

There are two ways to get around this.

1. Eject your CD when windows has finished copying all the files to the HDD (after the dos portion of the windows install)

2. Disable WFP alltogeather.

To disable your WFP, add this to a reg file (put it in notepad, save it as a .reg):

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonAdd]

To re-enable your Windows File Protection later on, modify "SFCDisable" to read 0 by navigating to that key using regedit.


To change your default wallpapers, simply place the image file which you wish to have as your wallpaper into into $OEM$\$$\Web\Wallpaper - If this directory does not exist, now would be a good time to create it :D

To actually set your default wallpaper to something different, orther than Microsoft's default grassy hills wallpaper (bliss.bmp), you need to use a little regristry tweak.

Add this to your tweaks.reg file: - Thanks to DaveXP for this tweak

[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Desktop\General]

Ofcourse you will need to replace "xppaper.jpg" with the actual file name of the wallpaper you wish to use, including its extention.

Note: I am not sure if you can use %systemroot%\\Web\\Wallpaper\\name_of_wallpaper yet, but i will try it out, and update this part of the guide.

Note: If you do not have a tweaks.reg file, refer to the Unattended XP Install Guide


First off, you need to have changed your uxtheme.dll file, which is the first oder of buisness in this guide. If you have not done so already, please do as it says, as changing and adding default themes to Windows is not possible without it.

Once you've followed that guide, place your themes into $OEM$\$$\Resources\Themes - If you do not have a $$ directory in your $OEM$ folder on your CD, then create it now :D

The next step is to go download some nice themes which you'd like to add to your CD. Once downloaded, extract it, and throw it in your $OEM$\$$\Resources\Themes\ directory.

To change the theme you wish to be applied by default, you need to edit a few lines of your winnt.sif file. Thoes lines are as follows.


Also, in your winnt.sif file, you need to have the following options set:


Your themes (.msstyles) need to have a .theme file to acompany them. The .theme file, simply tells Windows where all your theme files are located. For example, the desktop wallpaper, any special icons, and the theme itself. If you download a visual style, and it does not containa .theme file, read on.

How to make a .theme

To make things tremendiously easy for you, ill post a working .theme here. All you need to do is copy and paste into a word document, change the locations to point to the right place on your CD (marked in red) and save it as a .theme file. In this example, my theme is called CyberField.

; Copyright © Microsoft Corp. 1995-2001


; My Computer



; My Documents



; My Network Places



; Recycle Bin




[Control Panel\Cursors]















DefaultValue=Windows default


[Control Panel\Desktop]
















Okay, after all that, this is what my directory structure looks like.




That should be it :rolleyes::

Boot Screen:

The first thing you need to do is patch your uxtheme.dll file. Instructions are located at the top of this post.

After that, download a custom boot screen, Or if you prefer to make one yourself, then you can use any BMP you like.

Note: If you downloaded a bootscreen, and it contains a file called ntoskrnl.exe, then skip this next parragraph.

Next, what you need to do is make a copy of your ntoskrnl.exe from your \Windows\System32 directory and place it somewhere thats easier to get to and work on. Now, grab a copy of Resource Hacker and open up the copy of your ntoskrnl.exe file.

In the left hand column you will see a list of resources to edit. Open the first tree called Bitmaps and you will see numbers 1-10. Numbers 1, 8, and 10 are the WinXP Pro bitmaps. 1, 7, and 9 are for Home Edition. In this tutorial we will be using Pro. Select number 1 --> Action/Replace Bitmap. Select Bitmap to replace 1, then click on 'Open file with new Bitmap' and locate your edited boot logo. Then click replace. Save your new ntoskrnl.exe file, and you're done. This will replace the main picture of your boot logo. If you wish to customize it even further and change the litle moving blue dots, or save the origional boot screen for editing, then i suggest you follow this more extensive guide.

Still with me? Good.

If you downloaded a ntoskrnl.exe file, this is where you should continue reading.

For adding your ntoskrnl to your XP CD, i will be using the method used by gosh, which will be outlined here.

What we need to do now, is make a directory on your XP CD, under this path:


The next thing you need to do, is rename your ntoskrnl.exe file to oemkrnl.exe and place it in the folder you just created above.

Now, in your winnt.sif file, add these commands:



Next create a bootlogo.cmd file which contains this:

bootcfg /RAW /A /Kernel=OEMKrnl.exe /ID 1
bootcfg /Timeout 0

Here's a brief explanation of the above code:

When you install Windows XP, it copes the $OEM$\$$\System32 folder to %windir%\system32, thus, placing your oemkrnl.exe file into your system32 folder. When XP Setup then processes the GUIRunOnce section of your winnt.sife file, it adds the switch /kernel=oemkrnl.exe to your boot.ini file, which forces windows to use your edited file, instead of the one shipped with windows.

So why do all this when you can just put your ntoskrnl.exe into the i386 folder? Since this is gosh's method, i'll let him explain.

1 - If you install a windows update that has a newer version of ntosrknl.exe, it'll replace your customized ntoskrnl.exe file. The only fix would be to resource edit the new ntoskrnl.exe. This isn't very practical when you consider there have been at least 4 kernel updates to xp since sp1 was released. Using my method, the custom ntoskrnl.exe is ALWAYS used, even if you do windows update.

2 - If you need to install a service pack, all you do is delete the /kernel= part in your boot.ini. If you integrated a custom ntoskrnl.exe file, you would have to use the switch -o to install a service pack. My method is more service pack friendly.

Once you've done all that, go grab yourself a coke. You've earnt it.


The msgina.dll contains lots of little windows goodies to change and configure. It contians some windows images, and also some interesting strings of text. This guide will teach you how to change this image, and others like it.


The first thing you need to do, is grab a copy of the msgina.dll from \Windows\System32\ and open it with resource hacker.

Next, open the key bitmap --> 101 --> 1033. You’ll see the image here that we want to change. You can either save a copy of this image for editing (right click --> save [bitmap : 101 : 1033]), or make your own image, and replace the windows one (right click --> replace resource). For thoes of you who are like me, and like to make your own images, the dimentions of this image are 413 x 72.

Windows uses two different images (allthough identical) in your msgina.dll. They are as follows:

101: ctrl + alt + del (win2k style), Applying settings box, Shutdown dialog

107: login box

The only difference i can see in the two images, is that the one for your login screen is a little bigger than that for the end task menu. To change your login box pic, replace the key located in 107 --> 1033. Once again, for thoes who like to make their own images, the dimentions for this one are 413 x 88

If you have a little browse through the other keys in your msgina.dll, you'll notice these two images for other operating systems. I think that the reason for this is, windows just packages each operating system with the same msgina.dll, and which picture is used, depends on the version of windows. This file also contains lots of string values to dialogs, that you may want to fiddle with. For example, i changed the text on my End Task.. button to read Kill Programs..

Anyways, back to the task at hand. Once you've changed thoes two images, save your msgina.dll, and throw it in your $$\sytem32\ folder on your windows CD, and that should be it!

Below are images of my two edited images in use.


Happy cutomizing!

Note: Windows XP Home users can apply new images to their version of Windows by editing the 128 and 129 keys respectively, instead of the keys mentioned in the guide.

Edited by b0r3d
Link to comment
Share on other sites

he he. Was wondering how far you all were on this. I had the custom theme thing going but had not added the boot logo's. I do it a little different but not to terably. I add the themes the same and then use the hacked uxtheme.dll as aron mentioned above. The only thing I think I do diferently is that I dont use guirunonce to get any of this done. I finnaly got it all running durring the first install part without needing to use guirunonce.

The inf files are working well now also. I'm quite happy with it all. and i use a little progie called cmdow to hide the command prompt windows durring install.

I'm trying to think if there is anything you missed but i can think of anything right now. Well other than small regestry tweaks but those are kind of personal depending on the look and feal each person wants. For me I want a default theme that looks nice under windows xp but I also add few things to the desktop to make it look a little more like windows 98 so others can get used to it easier.

all in all thanks for the guide.

Link to comment
Share on other sites


It's more easier to put the theme and wallpaper in SFX archive and put it in svcpack.inf

and in winnt.sif make it like this


DefaultStartPanelOff = Yes

CustomDefaultThemeFile = "%WinDir%\Resources\Themes\CoolXP blue.theme"

*since you choose the theme it will get it's own wallpaper

want more explain ask !

Link to comment
Share on other sites

I don't know.. In my openion, the best way to add my own wallpapers, is to rename them as the original windows wallpapers, use the command "MAKECAB wallpaper.jpg Bliss.JP_", and so as for the rest of the pictures.

Then all you have to do is to replace the existing files with the cabinet files you've just made.

This method is the best as it doesn't inscrease the CD size

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...