الثلاثاء، 25 سبتمبر 2012

How to Create a REG File for Windows XP



The Windows Registry is a database of system and application settings, as well as runtime information.
It can be a confusing morass of keys, subkeys, and values, but if you know what you're looking for you can quickly back up and fix almost anything.
Similar to a file explorer, registry values are organized into keys (folders) and subkeys (subfolders), with values (files) having a name and some bit of stored information. Backing up registry values in Windows XP creates \"reg\" files, which can be edited in a text editor and merged into the Registry to re-enable your preferred settings.


 Instructions
 Things You'll Need 
 Registry Editor (regedit.exe on Windows XP)Regular backups of registry values before editing.



 Manual Editing—Registry Editor 

1 Open the Registry Editor from the \"Start\" menu by selecting \"Run...\" and typing \"regedit\" in the popup dialog. 

2 Find the registry value in a registry tree (key) that needs to be fixed. For example, the setting for showing \"Recent Documents\" in the Start menu is stored at [HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer] in the registry value \"NoRecentDocsMenu\". 

3 Before changing anything in the registry, create a backup of the registry key by right-clicking on the key in the left side of the Registry Editor—in this case, \"Explorer\" is the lowest key -- and select \"Export\". Save the file to your Desktop with a recognizable name, such as \"Explorer Policy—Original.reg\", with the extension \"reg\" telling Windows it is a registry key file. 

4 Double-click on the registry value \"NoRecentDocsMenu\" to modify it (right-click to \"Rename\" it). In the popup window, change the \"Value data\" from 0 to 1 to disable \"Recent Docs\" in the Start Menu. Click \"OK\". 

5 Changing some registry settings may require a logoff/logon before taking effect, while others may require a computer restart. Try logging off and back on, then check the Start menu to see the effect.

 Manual Editing—Reg Files 

1 Find the backup registry file we created earlier, \"Explorer Policy—Original.reg\". The default double-click action may be to merge the setting with the registry, so right-click and select \"Edit\" to open it in Notepad. 

2 The first line of the file tells you what you used to create the registry file, and must be present— \"Windows Registry Editor Version 5.00.\" The registry key we changed appears between square brackets [ ], ending in \"...Policies\\Explorer].\" The registry values are beneath the key, given as \"name\"=type:value. Note that all of the values we saw earlier in the Registry Editor were saved to this file, not just the one we changed. 

3 Erase all of the values except the line with \"NoRecentDocsMenu\"=dword:..., and save the file as \"Explorer Policy—Recent Docs.reg\" to your Desktop. This file now has the instructions to find the given registry key (or create it if it doesn't exist) and modify (or create) the registry value with the given data type and value. This will restore the Recent Documents to the Start menu. 

4 Right-click on the new registry file and select \"Merge.\" Click \"OK\" to approve changing the registry, and \"OK\" for the popup indicating a successful change. 

5 Log off and back on and then check the \"Start\" menu to see the effect.


 Tips & Warnings 


  • In a registry file, to remove a specific value, put a minus sign after the equals, like \"NoRecentDocsMenu\"=-. To delete the default value of a key, enter @=- on the next line below the key name in brackets. To delete the entire key (and all of its subkeys and values) put the minus directly after the open bracket in the key name, like [-HKEY_CURRENT_USER\\Software...
  • To \"refresh\" Windows after a registry change, so you may not need to log out and back in, open the Task Manager with \"Ctrl+Alt+Del\" or \"Ctrl+Shift+Esc.\" Select \"explorer.exe\" and click \"End Process.\" After it reloads (the desktop and taskbar may flash), check to see if the new registry settings have taken effect.
  • If a registry change causes Windows to fail, use the Recovery Console to restore the registry hive backup (.BAK) file, usually saved to the %Windir%\\System32\\config folder.
  • Many programs create registry keys that remain even if they are uninstalled. A \"bloated\" registry can affect computer performance, since the registry is constantly being scanned for data. Careful use of registry-cleaner software may help, simplifying the manual steps to remove unneeded registry keys.



  •  ALWAYS back up the registry before you edit anything. However, changing something major may prevent you from accessing the registry or even logging in to Windows, so consult appropriate documentation about how keys affect Windows behavior before \"going fishing.\" Creating a System Restore Point before editing may also be a good idea.
  • Do not double-click registry files—this is usually the default action to merge their contents to the registry. Instead, always right-click registry files to ensure you are choosing the correct action.
  • You must be logged in as a user with administrative privileges in order to edit the registry.

الاثنين، 24 سبتمبر 2012

Installing Visual Studio 2010 – Error writing the project file. Class not registered


This weekend I installed the new Visual Studio 2010 on several different machines. I use multiple OS platforms  so it’s useful to have Visual Studio installed on machines with different configurations. I had no problems installing on Windows 7 and Windows Vista, but hit a snag on Windows Server 2003 (SP2).
After installing Visual Studio 2010, VS launched fine but when I attempted to create a project, I got the not-so-helpful error message “Error writing the project file. Class not registered”. OK.
I noticed that when I launched VS for the first time I did not get the option to select a settings configuration, such as General Development Settings or Web Development, like I did with the installs on other machines. In the VS 2010 UI, when I went to Tools | Import and Export Settings, the UI dialog had an empty list box where I expected to see a list of files with a .vssettings extension. After searching the Internet for this error message I came across several possible causes. Well to cut to the chase, it turns out that the machine I had installed onto did not have the required MSXML6 parser. A VS settings file is XML-based and evidently needs MSXML6 rather than earlier versions of the parser.
A quick install of that component from Microsoft.com/downloads solved the problem.