Disclaimer: All care No Responsibility. you follow the instructions provided at your own risk. I take no responsibility any damage you may cause. Please read the article in full before starting

To test some website stuff I tried to install IE7 on my windows 7 machine. now I cant run explorer for browsing files or accessing control panel and the like. I found an old guide for re-registering all your dll’s that I thought was quite nifty so I thought I woukld re-share it with you. (up-dated from windows 98)

The original instructions basically get you to dump all DLL files into notepad, then do a find and replace to regsvr32 them all. if you do it from c:\ like it suggests, you might get more than you need. including dll files from the recycle bin.

this fixed my problem. and I think its worth trying this way before doing it for every file on your computer.

I am going to assume your windows installation is on C:\ and in C:\ windows

1. open command promt as an administrator (You may need to find it in accessories, right click it and run as administrator if you are having issues with security rights)

2. type

CD C:\WINDOWS

(and C:\ if you werent on that drive by default)

3. type Dir *.dll /s /b > c:\regdll.bat

This will search for all dll files within c:\windows (including /subdirectories) and output them (in /bare format) into a text file on the c:\ called regdll.bat
you cant run it just yet because its just a list of files, we need to change it so that its actually got a command. open the file in your prefered text editor (notepad) and do a replace on c:\ , replacing it with Regsvr32.exe /s c:\

This is what your file should look like.

Now. before trying to run the file. I highly recommend you scrolldown until you find $patchcache$ and WinSXS folders and deleting all the references to the files within those directories in the file. (dont delete them off your computer) Leaving them in will excruciatingly increase the time to do this and very likely stuff lots up. Also John Crenshawmentions: You probably also want to delete any lines for the temp folder, if any, since registering a DLL that may not exist later is probably not an awesome idea.

Once this is done. Save the file and run it. If you still have your command prompt as administrator open, just type c:\regdll.bat

This will register all dll files in c:\windows and subdirectories. This will take some time, (Potentially, also register files that would not normally be registered by default, (like files in $patchcache$ and other windows directories if you did not remove them). It worked for me and I dont need to do a reinstall 🙂

5. Vista ESM

Run it to extract the MSI, this will put another ESMVISTA.msi file in a subdir of your choosing, running the below command straight on this file does not work.
start a command prompt with admin rights, start->all programs-> accessories-> RIGHT CLICK on Command prompt and click run as administrator
goto the folder with the extracted MSI file, and run it with the /q switch to get rid of the ‘not for vista’ error (so ESMVISTA.MSI /Q)

eg: c:\users\you\downloads\esm\vista\esmvista.msi /q

Wait at least 10 minutes while it does its thing.

It is is a silent install, you wont see anything, but I have had cases of it breaking because people started AD too soon.

5B. no really!

Actually wait at least 10 minutes, it WILL NOT WORK if you start AD too soon, and you have to start again. If you have a very slow computer, leave it longer.

6. Run Active Directory

64bit Users READ THIS!

this comment from bacanter01 on windows7forums may help

I noticed that mmc runs in x64 mode even if you run mmc from the system32 folder. If you start mmc with the /32 switch then you can add ADUC and see the exchange tabs. It didn’t work until I installed SP1 but all you need to do is install RSAT > install the ESM tools for Vista with the /q switch (watch for MSIEXEC to stop in the task manager before you try to run it) > Install SP1 > Run mmc with the /32 switch. I haven’t tried installing ESM after the SP1 install but it work everytime if you install it afterwards.

Changelog

1.0 put up

1.1 Grammar etc, added mirror for files

1.3 updated with new links to RSAT

1.4 tested again on new W7 install, worked 🙂

1.5 removed long lists of files, replaced with bat files

1.6 30/11/2010: tidied up one of the commands that missed some slashes, added a comment about the example file registrations being only an example, added another step to remind people to leave the silent install a bit longer.

1.7 3/9/2011: added comment that may help 64bit users

1.8 10/09/11 : added some more steps to the extraction of the MSI stuff