IMPORTANT NOTE: Patching windows isn’t necessarily “safe” and shouldn’t be attempted unless you are willing to troubleshoot problems. There’s also some chance that it would void your warranty, etc etc. The point is that you might encounter problems.
Do NOT attempt this if you are inexperienced with computers or Windows OS. Update- After the latest update to Windows, Vistaglazz no longer works so this tutorial for those who want to restore their custom theme back after updating. Enjoy
First Step – Download the Patched Theme Files
This is an incredibly important step, as you don’t want to rename any files in the system32 directory without having the patched versions for the right version of Vista.
You’ll need to browse to the Within Windows site and download the correct version for your operating system. If you are running SP1, make sure you get the correct version, whether 32-bit or 64-bit.
Code:
http://www.withinwindows.com/uxtheme-patches/

There are three .dll files included in this package:
* themeui.dll
* uxtheme.dll
* shsvcs.dll
All of these files are normally located in the C:\Windows\System32 directory. Those files will need to be replaced with the patched versions in order to enable custom themes.
Once you’ve downloaded the files you’ll need to extract them using a utility that can process .rar files, like WinRar or the free jZip utility. Make sure that you have extracted the files before you move on to the next step!
Patching Files Using Take Ownership UtilityPatching these files is easiest if you use the Take Ownership context menu item, which will help you assign ownership of these files to your user account which will allow you to rename the files.
Browse down to C:\Windows\System32\ and then put the following into the search box so you can see all the files at the same time (make sure to use capital letters for “OR”)
Code:
themeui.dll OR uxtheme.dll OR shsvcs.dll

Right-click on the files and choose “Take Ownership” from the menu, and then click through all the UAC prompts.
Now you’ll need to rename the files and append .old to the end of the file (either right-click and choose Rename or use the F2 key).

At this point you should have 3 files with the .old extension. Whatever you do, DO NOT RESTART your computer at this step

Now we need to copy the patched files into the system32 folder. You can just type C:\windows\system32\ into the address bar, and then copy / paste or drag the patched files you downloaded into this folder.

The most important thing here is to make sure that those three files are sitting in the System32 folder. Now you should be able to restart your computer.
Patch Theme Files Using the Command LineI recommend using the take ownership script above, rather than this method, but for completeness I’ll explain it as well.
First you’ll need to open a command prompt in Administrator mode by right-clicking the command prompt and choosing Run as Administrator, and then run these commands to take ownership of the files, and then grant access to the administrators group:
Code:
takeown /f c:\windows\system32\themeui.dll
takeown /f c:\windows\system32\uxtheme.dll
takeown /f c:\windows\system32\shsvcs.dll
icacls c:\windows\system32\themeui.dll /grant administrators:F
icacls c:\windows\system32\uxtheme.dll /grant administrators:F
icacls c:\windows\system32\shsvcs.dll /grant administrators:F
Note: Whatever you do, don’t try and run takeown *.*, because taking ownership of every single file in the windows directory is going to cause all sorts of problems.
Now that you have taken ownership of the files, you can rename the files to *.old by running these commands:
Code:
ren c:\windows\system32\themeui.dll c:\windows\system32\themeui.dll.old
ren c:\windows\system32\uxtheme.dll c:\windows\system32\uxtheme.dll.old
ren c:\windows\system32\shsvcs.dll c:\windows\system32\shsvcs.dll.old
Note: at this point you should be very careful to NOT RESTART your computer, because if you do so things will break.
Now you can copy the files that you downloaded and extracted into the system32 directory by running a command similar to this one (adjusting for wherever you extracted them to)
At this point you can now restart your computer.