Step by step guide to Clean and Sort your windows registry!


Introduction:

Always remember:
A Clean registry = Better performance = Save your invaluable time

In this article we’re going to clear our registry manually! Yes, manually! The expert’s way!
Some of the steps below and this article in general was inspired by the article : “How to Clean the Windows Registry by Hand”

Some might say cleaning registry manually is unsafe and may suggest using Third-party softwares. But I say when you do it yourself, you know what you’re doing to your heart of windows! Plus that even famous registry cleaners may harm your windows or softwares in some situations (As I experienced it!).

Just take precautions and take backups before you begin! And read the Article (and links down the bottom) before you start and make sure you understand.

By reading this article not only you’ll be able to clean the registry yourself but also you’ll learn many places that windows uses to store it’s data! In next steps I’ll show you how to clean this areas of your registry:

1) Useless or old Software settings
2) Useless or old File extensions
3) Windows history list
4) Explorer history lists
5) Recent Office documents references
6) Nero history lists
7) Run command’s most recently used list
8) Internet Explorer Address Bar History (Recently typed URLs)
9) Useless or unwanted Startup programs
10) Advanced cleanup

Precautions:

Before entering windows registry do the following steps to be safe:

1) If you feel you don’t have enough knowledge about this matter or may make mistakes DO NOT Proceed!
2) Make a “System restore” point.
3) Make a full backup of your registry

1. Click on the “File” menu and select “Export”.
2. Select “All” in the “Export range” panel.
3. Choose a location for the backup and then enter a name.
4. Click on “Save”.
#  For more info on “System restore” and “Registry backup” visit this guide from Microsoft

4) Read each step carefully and completely to avoid any mistakes.

How to do the cleaning:

Open your windows registry by typing “Regedit” in the Run box (Press “Windows Logo key” + “R” for quick access to Run)
Follow the steps below to clean each area of your windows registry.

Note1: You can alternatively use “Regedt32” to access regedit or use one of the softwares suggested to edit registry.
Note2: Using the suggested softwares at the end of article is strongly recommended.

Alright, Start your cleanup by following the below steps:
1

Useless or old Software specific settings

————————–

—————————————————————-
HKEY_LOCAL_MACHINE\Software
HKEY_CURRENT_USER\Software

Navigate to above keys and remove any key which it’s corresponding application have already been uninstalled.

a) Look for keys that contain either the application’s name, or more commonly, the application’s developer (company name).
b) Highlight a key for the application.
c) Press “Del” to delete it.

For example you’ve uninstalled SoftwareX a long time ago but it’s key is still in the registry! You should remove it quickly!

Note: Do not remove Keys related to softwares that store license information for future use!

2

Useless or old File extensions

——————————————————————————————
HKEY_CLASSES_ROOT\

Navigate to above key. Look for empty keys. If a key is empty the associated file type is therefore useless and can be deleted safely.

Note: An Empty key is a key with a single (default) string and without any sub-keys. Do not remove keys which have sub-keys or have their default value set.

3

Windows history list

——————————————————————————————
HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache

Each time that you start a new application, Windows automatically extracts the application name from the exe file, and stores it for using it later, in Registry key known as the ‘MuiCache’.
Go to above key and remove strings containing file paths that no longer exist. These invalid references can be removed safely.

Note1: Be aware that even if your delete MUICache items, they’ll reappear the next time you run the applications. So there is no point in deleting keys of your existing softwares.
Note2: Be careful NOT to remove original windows entries; User created entries appear at the end of list.
4

Explorer history list

——————————————————————————————
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

Navigate to above key and delete any empty key. If no information has been stored in the key, the associated file type is therefore useless and can be deleted.

Note: An Empty key is a key with a single (default) string and without any sub-keys. Do not remove keys which have sub-keys or have their default value set.

Explorer history list (entry for “OPENWITHLIST file)
——————————————————————————————
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\OpenWithList

The “Open with” Windows function created the key because you wanted to open a file with the “OpenWithList” extension.
Delete the key if no information has been stored in it.

5

Recent Office documents list

——————————————————————————————
HKEY_CURRENT_USER\Software\Microsoft\Office

Go to above key. You can see your installed office products. Find your product version, for example office 12 or 14, and then go to it’s specific key and then find the key for your
specific program (e.g. Word or Powerpoint) then enter the “File MRU” key for each one and remove unnecessary Items from the right pane.

Note: Do not remove the “default” and “Max display” strings!

6

Nero application history lists

——————————————————————————————
HKEY_CURRENT_USER\Software\Nero

This part is for users who have installed one of Nero products. So if you don’t have it jump to next step.
Navigate to above Key and find your installed version of Nero (e.g. Nero 9) and then select the key for a specific program (e.g. CoverDesigner)
And then remove unwanted items or all of the items in “Recent File List” key.
7

Run command’s most recently used list

——————————————————————————————
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

This key contains the typed commands in the Run box. For example “Regedit” that you’ve just typed to access registry.
Navigate to above key and remove unwanted items or all of items.

Note1: Do not remove “MRUList” string.
Note2: If you want to delete only certain items, make sure that the remaining items are renamed in sequential order start from a.

8

Internet Explorer Address Bar History (Recently typed URLs)

——————————————————————————————
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs

This key contains the typed addresses (URLs) in the Internet Explorer Address Bar. For example “http://www.experts-exchange.com” that you’ve just typed to come here and read this!
Navigate to above Key and delete all the URLx items (e.g. URL1, URL2 and so on) that you do not wish to be visible in the address bar drop down list.

Note1: If you want to delete only certain items, make sure that the remaining items are renamed in sequential order start from url1. Otherwise you might corrupt your remaining keys.
Note2: It’s necessary that all IE windows should have been closed before cleaning, otherwise the changes you’ve made won’t be saved.

9

Unwanted Startup programs

——————————————————————————————
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Run

Jump to above keys.

a) Highlight the “Run” key.
b) Look for values inside the right pane. These will be shortcuts to executable files.
c) Highlight a value to remove. If you’re not familiar with these, or are unable to guess which ones correlate to which applications, Google for it or use a process search engine such as Process Library. (http://www.processlibrary.com/)

Note1: Removing an entry which you’re not familiar with, may cause some of your startup programs to stop loading automatically.
Note2: Do not remove original windows entries, including : Ctfmon.exe, IMJPMIG8.1, PHIME2002A, PHIME2002ASync
10

Further cleaning

——————————————————————————————
Search applications by their name, executable name or folder name. Remove any application listings which have already been uninstalled.

a) Press “Ctrl” + “F” to open a find dialog (Or select “Find” from edit menu).
b) Enter the text used to search for the application’s listings (Name of the software that you want to remove).
c) Click on “Find next” to search. The key or value should be highlighted when found.
d) With the proper key or value highlighted, press “Del” to delete it.
e) Press “F3” to find the next result and repeat.

Note: Do not remove Keys related to softwares that store license information for future use!

————————————————————————————————————————————————-

  • What to do after cleaning:

After finishing the clearing process close the registry and restart your windows for changes to take effect.
It’s recommended that you use a “Registry Defragment” tool to optimize your registry further.

  • In case of mistakes:

If anything goes wrong, restore your registry with the backup you made. This can be done by opening the backup file directly (ie: double-clicking on it), or using a Windows installer CD to boot to a “recovery” console and restoring it manually.

  • Compatibilities:

This article is primarily designed for windows XP but it may work on other windows versions. (Some parts may not apply to some prior or later versions of windows)

  • Notes and warnings:

This article is intended for simple cleaning of registry. Third-party registry cleaners also look for invalid items or “no-longer-exists” items.
Third-party registry cleaners may not have the best logic and algorithms to effectively clean all registry entries.
They perform cleaning tasks based upon a predefined set of rules that may not work in your registry and even may lead to a corrupted registry.
Or they may remove parts of windows registry which may be against your favorite configurations or expectations.

The software you may use to clean your registry are: CCleaner, Tuneup utilities, MindSoft Utilities, etc.
The software you may use to defragment your registry are: Tuneup utilities, MindSoft Utilities, Auslogics Registry Defrag, Free Registry Defrag,etc.
There are many registry defragmentation tools. You can find them via software download sites (e.g. Softpedia,Filehippo, CNET Download, etc)

Note1: Tuneup utilities comes with a nice “Registry editor” tool with a lot of features.
Note2: Editing the registry with the built-in Windows Registry Editor can be risky. There is no “undo” functionality if you accidentally delete the wrong key or value. Always take a backup copy first.
Get a Third-party registry editor to be more comfortable and safer.

Free software like RegEditX:                         http://www.softpedia.com/get/Tweak/Registry-Tweak/RegEditX.shtml
Paid software like Registry Workshop:          http://download.cnet.com/Registry-Workshop/3000-2094_4-10281175.html

SCCM OSD Basic troubleshooting


SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispersed nature of the blog posts that deal with some of these issues. This article will help SCCM OSD newbies with some of these issues.

Integrating SCCM and MDT 2008
For our deployments, we always install MDT 2008 on our SCCM server and select Configure ConfigMgr Integration from the MDT area on the start menu. This gives us:

  • Templated task sequences we can import into SCCM
  • Additional TS Variables for use in our task sequences
  • Additional options and flexibility around computer backup, USMT etc.

For beginners, the template task sequences are a very quick way to get up and running while being guided through the process, while for more advanced users the additional functionality comes in handy when your task sequences become more complex.

Setting yourself up
In order to have any chance at troubleshooting SCCM OSD issues, you need to do the following:

1
Install trace32.exe which is part of the SMS 2003 Toolkit 2
(download from Here)
2
Enable command line support within your boot images:
a.  Go to the properties of your boot image(s) (right click and choose Properties)
b.  Go to the Windows PE tab and tick the Enable command support (testing only) option.
c.  When prompted, click on Yes to update your distribution points.
d.  From within your boot image (Windows PE) environment, you can now press F8 to
open up a command window — very useful for troubleshooting
3
Be familiar with your OS setup log files (e.g. WindowsXP has setupapi.log, netsetup.log etc.)

Log files
The root of all Task Sequence troubleshooting is called smsts.log — and this log is always the first step to troubleshooting any TS issue — if you have an issue, look in here first!

Unfortunately, the smsts.log can be stored in one of 7 locations, depending on the stage of the build and the architecture of the OS:

  • WindowsPE, before HDD format:
    x:\windows\temp\smstslog\smsts.log
  • WindowsPE, after HDD format:
    x:\smstslog\smsts.log and copied to c:\_SMSTaskSequence\Logs\Smstslog\smsts.log
  • Full version windows, before SCCM agent installed:
    c:\_SMSTaskSequence\Logs\Smstslog\smsts.log
  • Full version windows, after SCCM agent installed:
    c:\windows\system32\ccm\logs\Smstslog\smsts.log
  • Full version x64 windows, after SCCM agent installed:
    c:\windows\sysWOW64\ccm\logs\Smstslog\smsts.log
  • After Task Sequence has finished running
    c:\windows\system32\ccm\logs\smsts.log
  • After Task Sequence has finished running(x64)
    c:\windows\sysWOW64\ccm\logs\smsts.log

Information is also logged as SCCM client events, which can be viewed by running the SCCM report:
Last 1000 messages for a specific computer (Errors, warnings and information)

As a general rule, the SMSTS.log provides more detail, however the SCCM client events are easier to read, and, for simple issues, can lead you to the root cause very quickly.

PXE boot issues
In order to resolve PXE boot issues, there are two main log files we are interested in:

  • Pxecontrol.log — which is located in the installation logs directory (eg C:\Program Files (x86)\Microsoft Configuration Manager\Logs\pxecontrol.log)
  • Smspxe.log — which is located in MP logs directory (eg C:\Program Files (x86)\SMS_CCM\Logs\smspxe.log)

If this is the first time you’ve setup a PXE service point, I recommend you check pxecontrol.log, there should be lines similar to the following:

address to server list 192.168.00.117  $$<SMS_PXE_SERVICE_POINT><Fri Jul 31 07:54:45.248 2009 Cen. Australia Standard Time><thread=772 (0x304)>
adding address to server list 127.00.00.01  $$<SMS_PXE_SERVICE_POINT><Fri Jul 31 07:54:45.250 2009 Cen. Australia Standard Time><thread=772 (0x304)>
Sending availiability packet to: 192.168.0.117~  $$<SMS_PXE_SERVICE_POINT><Fri Jul 31 07:54:45.252 2009 Cen. Australia Standard Time><thread=772 (0x304)>
Sent 274 bytes to 192.168.000.117:4011~  $$<SMS_PXE_SERVICE_POINT><Fri Jul 31 07:54:45.253 2009 Cen. Australia Standard Time><thread=772 (0x304)>
PXE test request succeeded.~  $$<SMS_PXE_SERVICE_POINT><Fri Jul 31 07:54:45.355 2009 Cen. Australia Standard Time><thread=772 (0x304)>
Successfully performed availability check against local computer.~  $$<SMS_PXE_SERVICE_POINT><Fri Jul 31 07:54:45.357 2009 Cen. Australia Standard Time><thread=772 (0x304)>

1:
2:
3:
4:
5:
6:

Select allOpen in new window

If you see otherwise, then, WDS or the PXE service point is not correctly installed.  Without going into too much detail in this area, as a catch-all fix:

  • Uninstall the pxe service point
  • Uninstall WDS
  • Reboot
  • Install WDS, but DO NOT configure
  • Install the pxe service point
  • Re-check the pxecontrol.log

Another very common error is to see the following when trying to PXE boot:

PXE-T01: The specified file was not found
PXE-E3B:TFTP error -- File not found

1:
2:

Select allOpen in new window

This error is caused because you are missing files from your \remoteinstall\smsboot\x86 or x64 directory and is generally caused by one of two things:

1
The x64 boot image has not been added to the PXE service point.
“But I’m only deploying an x86  boot image and OS,” I hear you say.  It doesn’t matter.  If the machine is x64 architecture (which all today’s new machines are), the boot ROM requested will be x64. This in no way effects your ability to use an x86 boot image; this boot ROM process is completely independent.

The solution is to add the x64 image to your PXE DP and update. You will then see the directory \remoteinstall\smsboot\x64 populated with files, and your good to go.

2
Even after you update your PXE DP, the files still don’t show up.
This is a common issue.  When updating the DP, the WIM file is mounted (under C:\windows\temp), all your modifications injected (such as drivers, custom backgrounds etc) and then packed back up into the boot wim pushed to the DP.  At the same time, the boot ROM files were interested in are extracted to C:\Windows\temp\Pxebootfiles before being copied to \remoteinstall\smsboot\x86 or x64.

Sometimes the C:\Windows\temp\Pxebootfiles directory has something funky happen to it and doesn’t clean itself up correctly.  So the difficult fix is — Delete the directory and re-distribute the package. (The directory is hidden, so make sure you set the option in Explorer so you can see it).  You can also have a look at pxecontrol.log to see the extraction process and/or the error occurring.

On some computers you might PXE boot, proceed to see a screen which indicates that the PC is talking with SCCM, followed by a line which indicates a boot ROM called abortpxe has been used.  This indicates one of two things:

1
This computer has already been built via PXE.
If you want to run this advertisement again, you must go into the console, right click on the computer record and select clear pxe advertisement
2
There is no advertisement for this machines mac address or SMSBIOS GUID in the database.
This can be confirmed by viewing the smspxe.log.  In this case, you should ensure that
a. The computer record has the correct MAC address
b. The computer record is in a collection which has the task sequence advertised to it
c. The task sequence advertisement is available to PXE boot (a property of the advert)

Software Update issues on reference build
While creating the reference build, the target machine must not be a member of a domain (and therefore must only be in a workgroup).  Because of this, the machine cannot use AD to lookup SCCM server location details and software updates will fail (after a 20 minute wait).

To work around this, in your reference build TS, navigate to the step setup windows and configmgr, and in the installation properties add

SMSSLP=<fqdnOfSCCMServer> SMSMP=<fqdnOfSCCMServer> 

1:

Select allOpen in new window

This will allow the client to locate the software update point and download the appropriate updates. (Note: this assumes you have installed the Server Locator Point role on your server).

In the case that there are a large number of updates to be downloaded, you may also find that this task fails. This is caused by an issue documented in this TechNet blog entry about error 0x80244010.  Due to this issue, I recommend you create a number of software update tasks (I use 3), each with continue on error checked.  This will get around this issue, but will not cause any significant delay even if this issue does not occur.

Drivers
The deployment guys have a fantastic blog post on how to handle drivers in this TechNet Driver Management blog entry.

Boot image drivers
SCCM boot images are customised windows PE 2.x images used to boot the computer and contact the SCCM server. There are a couple of basic rules when working with boot images:

1
SCCM boot images only require network and local disk access (as they need to grab data from the SCCM server and apply it to the local disk) so these are the only drivers that ever need to be added to a boot image. (adding additional drivers will only bloat the image, slowing down your installs).
2
SCCM boot images are based on Windows PE 2.x, which is based on Vista.
You must add Vista drivers to your boot images only.  Even if you’re deploying on XP, it doesn’t matter, the boot environment is completely separate to your final OS.

The way I find out if I need to add additional boot wim drivers is to simply boot any new machines into a OSD TS, boot, press F8 to get a command prompt, then run

If there is no ip address (we don’t have NIC drivers and they need to be added), then run
diskpart | list disk

1:

Select allOpen in new window

If there are no disks listed, then we need to add mass storage drivers to the boot WIM.

Windows XP 07B stop issues
If you’re building Windows XP or 2003, these operating systems do not allow dynamic injection of mass-storage drivers. So, you have a few options:

  • Move to Windows 7 — which after 6 months of betas/RCs and now running RTM – I’m willing to say is brilliant.  …or…
  • Change the disk controller mode from AHCI or RAID to IDE in the BIOS (quick, but not recommended for a long term solution).  …or…
  • Use the appropriate AHCI mass storage drivers:
    a. Import the drivers into SCCM, using categories etc. (see the deployment guys blog post on
    best practices for this)
    b.  Add a task to the task sequence: Apply driver package
    c.  Select the appropriate driver package
    d.  Check the box: Select the mass storage driver within the package.…..
    e.  Select the appropriate driver.
    f.  Add a condition via a TS variable <model> or WMI Query (again, covered in the deployment guys post)

Task Sequence Variables
Task sequence variables are really what give task sequences a bucketload of power, as you can have one TS which accounts for all the variations in your environment.

One of the most common questions we get is:
How do I know what TS Variables are available?
Well, there is a list in this article:  Operating System Deployment Task Sequence Variables, or you could read the documentation (Toolkit Reference.doc from the MDT 2008 documentation), or search through the script which gathers the variables (ZTIGather.vbs), or dump them all out using another useful script from the deployment guys (See Logging All the Configuration Manager Task Sequence Variables).

The advantage of dumping them all is that the output actually has meaning, so you can see what variable has what value — as opposed to just looking at a bunch of variables that might not mean much to you without values assigned to them.

In addition to the built in variables, you can add custom variables to computer objects or to entire collections.

SCCM Client Version
If you are using SCCM 2007 SP1, there is a hotfix, KB955955 available here, which you should apply, as it removes a delay between tasks, which, for long task sequences can significantly reduce build time.  The article also includes instructions on how to implement the hotfix during your bare-metal builds.

%d bloggers like this: