Saturday, August 21, 2010

Windows xp registry editing & Backup and included files

The Registry
Windows XP Registry Backup
The Registry is the central hierarchical database used by Windows for the storage of information needed to configure a system for one or more users, applications, and hardware devices to name ‘some’ of the things stored – the Registry is quite dense if you peruse it, you will see it keeps configuration information for just about everything on your PC. Applications for instance will write to the Registry upon installation. The Registry (a database) is stored on files on your local PC.
• User.dat – user specific information stored as profiles
• System.dat – system specific information stored as profiles
This is the Physical view of the Registry. Now we will look at the inside of these files. To do this, you need to use the Registry Editor tool. This is also known as Regedit.exe. To run this executable, you can to go to Start => Run => type Regedit => Hit enter.
You are now in the Registry Editor.

You have 6 keys in the Registry:
HKEY_LOCAL_MACHINE: system hardware profile
HKEY_CURRENT_CONFIG: current hardware profile used
HKEY_CLASSES_ROOT: file type associations (like *.doc)
HKEY_USERS: configuration information for all user profiles
HKEY_CURRENT_USER: configurations for the current user
HKEY_DYN_DATA: hardware device information kept in RAM
The files are opened by the Registry Editor (seen below) and allow you to granularly configure just about any setting in the Operating System all the way up to changing the wording on the Windows Desktop Start button. You can see that the keys somewhat resemble the structure of the files. You have keys like HKEY_LOCAL_MACHINE that hold hardware profile information while the HKEY_USERS holds user profiles information.
From the next graphic you can see that we are somewhere in the HKEY_LOCAL_MACHINE key.

The bottom of the Registry Editor Dialog Box shows your location within the Registry as you browse through it.
Before you learn how to backup your Registry let us first understand why. The Registry is a set of files that can be corrupted just like anything else. Its sure as heck gets cluttered, why not get corrupted too? It’s also very prone to adjustment errors and does not respond well to them at all. Making changes in the Registry without the proper wisdom or guidance from a good resource will surely cause damage every time. It’s because of this reason alone that you need to think about backing it up. The other reason to back it up (and the main reason for this article's existence) is to prepare you as Network and Systems Engineers to make adjustments to Windows Systems to change or enhance their use – but do it safely, without destroying your system in the process. I will be writing many future articles on tweaking Windows systems Registry settings for networking and security and want to ensure that the importance of the Registry is clear so that if any of these changes wreak havoc on your system, you can quickly use this guide to show you some things you may need to know to help get it restored.
Backup Your Registry
Many tools are used to back up your Registry. Some come with the Windows Operating System, others are third party software. Older operating systems like Windows 95 required a manual repair process (renaming files from *.dat to *.da0 and back again) if you wanted to restore an older version of the Registry. Windows automatically backed it up for you; you had to manually restore it. This was not fun. Now, we have System Restore which comes with Windows XP.
So now that we know a bit about the Registry and options for backup available, we need to cover how to back up XP’s Registry for our future tweaking. Hardening the TCP/IP Stack for Denial of Service Attacks (a future article’s story) will cover Registry tweaking such as this.
The Registry (as I said earlier) is the nervous system so If it’s damaged, it’s a good bet that Windows is going to start to experience critical errors and ruin your day for sure. With a solid backup in place, you don’t need to worry so much about making a mistake making changes. Its good to be careful, but at least you’re covered if you make a mistake. It’s so simple to backup the Registry; there is no way you can blow it!
• First, you should know that your Windows XP system *unless you disabled it* is covered under System Restore. Make sure you are logged on as the Administrator or at least have Administrative privileges to the XP system.
Start => all Programs => Accessories => System Tools => System Restore

• Walk through System Restore and make a backup.

• Next, remember that changes only take place once you reboot the system. When you do (after you make your Registry Hacks), that’s when you will see the fireworks… or should I say – the infamous BSOD?
• Exporting the Registry. You can export the registry in hives or you can export the whole thing. Either way, it all depends on the type of change you are making or if you think you will be able to recover from it or not enough to get it repaired. This is a quick way to backup the Registry but not perfect, System Restore is your best bet.
o Open the Registry Editor (Start => Run => Regedit).
o Go to File => Import or Export.
o If you Export, you can save this to a Registry file (*.reg)

• If you need to you can rename a key. If you were going to make a change to one key, make the duplicate key and rename it this way if you need to come back to the original setting, you have it there, if you just delete the key, you may have to reference another machine and if it’s an application specific setting, you may not be able to recover from it if you don’t have the install disks for it anymore. It happens.

• If these all fail or if you're planning on major surgery in your Registry, you should seriously consider using System Restore. This is the best option for XP only if XP will no longer boot. If that’s the case, then you will need to rely on the Automated System Recovery and Recovery Console.
Congratulations! Now you are ready to begin tweaking with your services.
Summary
Its good that the Registry backup process was covered, future articles will talk about cool networking and security tweaks and we need a way to get back to normal. Our next articles in this area will cover TCP/IP tweaks via the Registry – stay tuned.

Error Message: Setup Was Unable to Install All the Components(unable software installation and extracting )

Error report collected from Microsoft web page

SYMPTOMS
When you try to install Internet Explorer 4.x or 5 for Windows 95 or for Windows NT 4.0 by using the Active Setup Wizard, you may receive one of the following error messages:
Setup was unable to install all the components.

Ie4wzd caused an inhttp://www.blogger.com/img/blank.gifvalid page fault in module unknown at 0000:00000015

Setup was unable to download all the required components for this installation. The internet is likely busy. Please try setup again later and select Smart Recovery to continue downloading.

Setup could not verify the information needed for installation. Please make sure your system clock reflects the current time, and then run setup again.

Setup was unable to download information about available installation sites.
Back to the top
CAUSE
This behavior can occur if any of the following issues occurs:
• You have an Internet-related file that is damaged.
• You have a damaged registry entry.
• You have a corrupted Setup .cab file.
• You try to install Internet Explorer 4.01 Service Pack 1 but it is not successfully installed.
• There is an invalid pointer to the Program Files folder in the registry.
• NTFS file system permissions are not set correctly on the folder that you are installing to (applies only to Windows NT).
Back to the top
RESOLUTION
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

To resolve this behavior, follow these steps:
1. Click Start, click Run, and then type regedit.
2. Locate and click the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
3. Look in the right pane for a value called "ProgramFilesDir".

NOTE: This value is used during the installation of Internet Explorer; if its data is incorrect, the installation of Internet Explorer does not succeed. It should contain something similar to "C:\Program Files". Whatever the value is, the drive and folder must exist on the hard disk and it must be the default installation location for programs on the computer. If it does not appear to be correct, double-click the value, and edit it in the string editor to make it correct.
4. Extract a new copy of the Oleaut32.dll file. To do so, follow the steps for the appropriate version of Internet Explorer:

Internet Explorer 4:

Use the C:\Windows\Command\Extract.exe program to extract the Ie4_1.cab file from the Ie4_s1.cab file to the Windows\Temp folder. Then, extract the Oleaut32.dll file from the Ie4_1.cab file in the Windows\Temp folder to the Windows\System or Winnt\System32 folder.

NOTE: You can skip this step for Internet Explorer 4.0 for Windows NT 4.0.

Internet Explorer 5:

The Oleaut32.dll file is located in the Mdac_ie5.cab file in Internet Explorer version 5.

Windows 95/98:

If the Internet Explorer .cab files are unavailable, or if extracting the Internet Explorer version of the Oleaut32.dll file does not work, you may be able to resolve the issue by extracting the Windows version of the file.

For Windows 95, the Oleaut32.dll file is located in the Win95_09.cab file on the Windows 95 CD-ROM.

For Windows 98, you can extract this file by using the Sfc utility.

For additional information about how to extract a file, click the article number below to view the article in the Microsoft Knowledge Base:
129605 How to Extract Original Compressed Windows Files
NOTE: If you receive an "unknown compression type" error message, extract a new copy of the Extract.exe file from the Setupw95.cab cabinet file (Internet Explorer 4.x) or the Gsetup95.cab file (Internet Explorer 5) into the Windows\Command folder. This replaces the older version of Extract.exe that does not work with most of the Internet Explorer 4.x and 5 cab files. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
171241 Cannot Manually Extract Files from Cabinet Files
5. If they exist, rename the following files in the Windows\System (or Winnt\System32 for Windows NT) folder to an .old file extension:
Advpack.dll
Inseng.dll
Jobexec.dll
Urlmon.dll
Wininet.dll
Wintrust.dll
Url.dll
For information about renaming files, click Start, click Help, click the Index tab, typerenaming, and then double-click the Files topic.
6. In Registry Editor, export the following registry keys to the desktop (for backup purposes):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Active Setup
Delete the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Active Setup
Quit Registry Editor.
7. In the Windows folder, rename the Active Setup Log.txt file to an .old file extension.
8. Delete the Internet Explorer 4.0 Setup folder. For information about deleting files and folders, click Start, click Help, click the Index tab, type deleting, and then double-click the Folders orFiles or folders topic. Then, remove Setup files or corrupted Setup .cab files:

Internet Explorer 4.x:

Delete the Internet Explorer 4.0 Setup folder.

Internet Explorer 5:

Determine if one of the Setup .cab files was damaged or corrupted during download. To determine that this is the cause of the problem, look at the "Active Setup Log.txt" file in Notepad, and search for the word "Failed". If the cause of the problem is a corrupted .cab file, you see a line that is similar to the following example, except that the file name may be different:
CheckTrust: C:\WINDOWS\msdownld.tmp\AS0C4771.tmp\IE_S3.CAB,
Result: 0 (OK)
File extraction: C:\WINDOWS\msdownld.tmp\AS0C4771.tmp\IE_S3.CAB,
Result: 80004005 (Failed)
If you see this information in the Active Setup Log.txt file, the cause is a corrupted .cab file and you should delete the corrupted cab file.
9. If it exists, delete the Windows\Temp\Ixp000.tmp folder. For information about deleting files and folders, click Start, click Help, click the Index tab, type deleting, and then double-click theFolders or Files or folders topic.

NOTE: The America Online (AOL) version of Internet Explorer creates a folder named Msie5 in the Temp folder. Delete or rename this folder before installing Internet Explorer 5.
10. Windows NT only: Make sure that you are logged on as an administrator. If you are installing to an NTFS partition, the Administrators group should have Full Control on the folder to which you are installing (where Iexplore.exe is located). Typically, this will be C:\Program Files\Plus!\Microsoft Internet. Right-click this folder, click Properties, click the Security tab, and then click Permissions. Verify that "Administrators" is listed with Full Control access. If not, make the necessary changes, select Replace Permissions on Subdirectories, click OK, and then click OK again.
11. Disconnect from all mapped network drives and delete any persistent connections.
12. Run Internet Explorer Setup.

If the steps in this article do not resolve the problem, look at the following articles for troubleshooting information. For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
303399 You Cannot Finish Installing or Upgrading Internet Explorer
305963 Internet Explorer May Not Install the Advanced Authoring Component
This resolution also works with Microsoft Windows 98 Second Edition being upgraded to Internet Explorer 5.01 with the same error message. You need only steps 2, 3, 4, 6, and 8.
Back to the top
MORE INFORMATION
This problem can also occur if the Ntdll.dll file is missing from the Windows\System folder. Extracting this file from the Windows CD-ROM corrects the problem in this case. For additional information about extracting files, click the article number below to view the article in the Microsoft Knowledge Base:
129605 How to Extract Original Compressed Windows Files
For additional information about similar issues with Internet Explorer 4.0 or 4.01 Setup, click the article numbers below to view the articles in the Microsoft Knowledge Base:
166706 Red X Displayed Next to Items in Component Installation List
223818 Err Msg: Setup Cannot Download Files to the Folder...
This problem can also occur if the Microsoft Zero Administration Kit (ZAK) is installed and enabled on the computer.

Check the Wtsrv folder for a ZAK folder. Run the Unhide.cmd program (included with ZAK and located in the Wtsrv\Zak\Scripts folder) which removes the hidden attribute from the files and folders. After you do this, Internet Explorer 4 and 5 can see the files and folders and be installed successfully.

For more information about the Terminal Server ZAK, please see the following Microsoft Web site:
http://www.microsoft.com/technet/archive/ntwrkstn/training/zak979.mspx