原帖地址见:http://www.okino.com/conv/changing_windows_registry_permissions.htm
|
Microsoft Windows users will find the following short tutorial useful for solving the ' How to fix 'Error 1402. Could not open key: UNKNOWN...' problem which is becoming prevalent in online forum postings. Please use this information at your own discretion.
A Quick Overview |
When installing or un-installing Microsoft Windows component technologies on Windows Vista/Seven/Win2K8-Server (or newer) you may encounter a message box similar to "Error 1402. Could not open key: UNKNOWN/Components/C9AE13788D0B61F80AF18C3B9B1A1EE8/...",
This long number is not an "address" as many believe but rather a registry parent container key name (as a GUID) and its child name (as a GUID). The last "/" character separates the two parent/child GUIDs.
This is not related to Okino software, but rather to components which are usually provided by Microsoft Corp. The following tutorial will outline our own personal experiences at Okino Computer Graphics of dealing with this problem. We have seen this problem posted in many forums but the simple solution we outline below which has not been properly documented as we have done so here.
Windows Vista/Seven/2K8: How to fix 'Error 1402. Could not open key: UNKNOWN...' |
The error is generally caused by insufficient or incorrect permissions on the named registry keys, or parent container of such registry keys. For Okino, it occurred on multiple occasions after upgrading some of our machines from Windows 2K3 to 2K8 server or from XP to Windows 7, and then upgrading/re-installing Microsoft products or components (Visual Studio and MSXML4 in our case). It is generally a simple matter to fix, once you know how.
- We recommended that you back-up your computer or at least the registry before taking this action. Microsoft's built-in backup program allows for the "system state" to be selectively backed up. Or, you can ZIP up the "windows/system32/config" directory while running in a backup operating system (this is where the registry hive files are located).
- You must be logged in as the 'administrator' (or an account with full administrator access) as well as disabling "UAC" (User Access Control). UAC is disabled by going into the "User" control panel applet and selecting the "Change User Account Control Settings". In Windows 7 the next dialog box will display a slider which you will want to set to "Never Notify".
- From the START menu, execute "Run.." and then type "regedit"
- Navigate to the following parent container:HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Components. The 'S-1-5-18' key may be different on your computer.
- As in the screen snapshot above, we wish to look for the first of the two GUIDs, namely "C9AE13788D0B61F80AF18C3B9B1A1EE8". Scroll through the children of the "Components" key to locate this corresponding first of two GUIDs from the message box shown above. Most often this will have a "+" beside the folder since it'll have one or more children items in it (one of which will be the second GUID from the message box shown above). You can also use the "Find" command within the registry editor but that is a much slower and more tedious operation to do.
- Right click on the parent container registry key, which is the "C9AE13788D0B61F80AF18C3B9B1A1EE8" for this example. Our screen snapshot below uses the "000085D..." registry key for illustrative purposes only. Choose "Permissions..."
- On the "Permissions for..." dialog box which appears next, press the "Add.." button and add in the "Administrator", "Administrators" and "SYSTEM" accounts. For ourselves, we also made sure to add in our own local account which had administrator priviledges.
- Back on the first "Permissions for..." dialog box, click on each account in the top-list and make sure each has the "Full Control = Allow" and "Read = Allow" permissions.
- Click the "Advanced" button so that the "Advanced Security Settings" dialog box appears:
- 1 - On the "Permissions tab" enable the checkmark box named "Replace all child object permissions with inheritable permissions from this object", then press the "Apply" button.
- 2 - On the "Owner" tab, highlight the "Administrators" name in the lower listbox, enable the checkmark box called "Replace owner on subcontainers and objects" and press the "Apply Button".
- Repeat the previous 2 steps once more. This time around you shouldn't get any errors about not being able to update the permissions on the child keys.
- Exit these dialog boxes by pressing the "Ok" button, so that you are back to the main registry editor.
- Go and re-run your Microsoft installer or un-installer. It is recommended that you right-click on its icon and execute "Run as administrator..." if available.
- If you continue to get this "Could not open key" message, on the exact same keys, then you didn't do the above operations correctly.
A More All-Encompassing Solution |
The above solution fixes the permissions on one registry key at a time. You will most likely find it to be a very tedious process because you will have to run your installer or un-installer multiple times, each time discovering another key which has incorrect permissions.
Another alternative solution is to "fix" all the keys at once. To do this, follow the same process as above except you should change the permissions on only one key, the one named "Components", which is accessed in the registry via this path:HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Components. The 'S-1-5-18' key may be different on your computer.
By fixing this one key, the new permissions will be propagated to all children keys throughout this portion of the registry. As we did ourselves, please backup your machine and/or registry before doing this global operation. This one-key fix worked for us.
Solving 'Error 1402. Could not open key...' During Okino Software Installation/Un-installation.' |
If you install Okino software, then upgrade your operating system, then you may find that the PolyTrans/NuGraf installer, or un-installer, reports the 'Error 1402. Could not open key: UNKNOWN...' for the following GUID keys:
UNKNOWN/Components/5076482617627454ba548d4cc39b3b7c/... UNKNOWN/Components/7a17f1b46c057b443ada6b3c75b48b69/... UNKNOWN/Components/94FB7165591953C49BDA8F1D56ED52BB/... UNKNOWN/Components/AB4993037846EA74FAD1A76F80E8BEBD/...These errors are due to your current installation of the Microsoft MSXML v4 component technologies. In our own case we simply could not un-install MSXML v4 from the "Add/Remove" control panel. The simple solution was to invoke the process outlined above to "fix" all the keys in the "Components" portion of the registry with the correct permissions.
Windows XP: How to fix 'Error 1402. Could not open key...' |
The following text is the general solution posted throughout the Internet.
The error indicates that you do not have sufficient permissions to update the system registry. Even if you are logged in as a system administrator, you may encounter this error if the system has been upgraded from a previous version of Windows.
The action below requires updating the system registry.
It is strongly recommended that you completely back-up your computer or at least the registry before taking this action.
- Select "Start", "Run", and type "RegEdt32". Click OK.
- Select HKEY_LOCAL_MACHINE
- In the menu, select "Edit", "Permissions". A dialog will come up.
- Check "Allow" for "Read" and for "Full Control", then click OK
- Expand HKEY_LOCAL_MACHINE and repeat steps 3, 4 for the keys "Software" and "System"
- Expand the "Software" key, and repeat steps 3, 4 for "Classes"
- Expand the "Classes" key, and repeat steps 3, 4 for "Installer"
- If you have made any changes in steps 1 through 7, skip to step 10. If you did not make any changes, continue with step 9.
- Open the "Classes" key, and click on "Installer" . In the menu, click "Security", "Permissions." Click the button marked "Advanced." Check "Reset Permissions on all child objects.", then click OK
- Close the registry editor
- Reboot the computer