VsRegEx Command-Line Utility
The Visual Studio SDK provides a utility, VsRegEx.exe, that lets you perform certain actions on the regular and experimental registry hives. VsRegEx.exe is located in Visual Studio SDK installation path\Tools\bin\x86\.
To run VsRegEx.exe, use the following syntax.
VsRegEx Action RegRoot RootSuffix
Argument |
Description |
---|---|
Action |
The action to be performed. It must be one of the following choices, which are explained in the list that follows this table:
|
RegRoot |
The regular hive that is to be cloned. The RegRoot is 9.0 for Visual Studio 2008, 8.0 for Visual Studio 2005, or 7.1 for Visual Studio 2003. |
RootSuffix |
A suffix that distinguishes the experimental hive from the regular hive. By default, Visual Studio SDK Setup uses "Exp". |
Note
If you type VsRegEx at the command prompt without including arguments, or with an invalid action, then help text is displayed.
The following list describes each type of action available.
GetOrig deletes the Visual Studio experimental hive and then recreates it from the regular hive by copying registry keys and files from the user profile folder.
The RootSuffix argument specifies the destination name of the experimental Visual Studio hive. Typically, this value is Exp. Later, when you start Visual Studio by using the command devenv /RootSuffix Exp /ranu, registry data is set to be read from the experimental hive.
When VsRegEx.exe is given the command VsRegEx GetOrig 9.0 Exp RANU, it copies regular registry keys and user profile files and then makes experimental versions, as follows.
From
To
HKCU\Software\Microsoft\VisualStudio\9.0
HKCU\Software\Microsoft\VisualStudio\9.0Exp
%USERPROFILE%\Application Data\Microsoft\VisualStudio\9.0\*.*
%USERPROFILE%\Application Data\Microsoft\VisualStudio\9.0Exp\*.*
Warning
If you type VsRegEx GetOrig \exp instead of VsRegEx GetOrig exp, an infinite recursion occurs and you will have to reinstall Visual Studio.
SetLKG sets the last known good (LKG) configuration state by copying registry keys and files from the user profile folder. You can create and store a working experimental registry hive by using SetLKG. Consider making a copy of your experimental configuration before you make changes to your code that could adversely affect the experimental hive.
The RootSuffix argument specifies the source version that is used to create the LKG. This option copies the settings from the RootSuffix location to the LKG location. Typically, you copy your experimental registry hive, where Exp is the RootSuffix, but you can store any hive that you have created.
When VsRegEx.exe is given the command VsRegEx SetLKG 9.0, it copies the following registry keys and user profile files.
From
To
HKLM\Software\Microsoft\VisualStudio\9.0
HKLM\Software\Microsoft\VisualStudio\9.0LKG
HKCU\Software\Microsoft\VisualStudio\9.0
HKCU\Software\Microsoft\VisualStudio\9.0LKG
%USERPROFILE%\Application Data\Microsoft\VisualStudio\9.0Ex\*.*
%USERPROFILE%\Application Data\Microsoft\VisualStudio\9.0LKG\*.*
Note
On the Windows Vista operating system you must run this command from an elevated command shell.
GetLKG restores a given configuration to the state of the LKG configuration by copying registry keys and files from the user profile folder.
The RootSuffix argument specifies the destination of the LKG version. This option copies the settings from the LKG location to the RootSuffix location.
When VsRegEx.exe is given the command VsRegEx GetLKG 9.0, it copies the following registry keys and user profile files.
From
To
HKLM\Software\Microsoft\VisualStudio\9.0LKG
[HKLM\Software\Microsoft\VisualStudio\9.0
HKCU\Software\Microsoft\VisualStudio\9.0LKG
[HKCU\Software\Microsoft\VisualStudio\8.0
%USERPROFILE%\Application Data\Microsoft\VisualStudi\9.0LKG\*.*
%USERPROFILE%\Application Data\Microsoft\VisualStudio\9.0\*.*
Note
On the Windows Vista operating system you must run this command from an elevated command shell.
Delete deletes the experimental hive.
When VsRegEx.exe is given the command VsRegEx Delete 9.0 Exp RANU, it removes the experimental hive and all its contents.
Note
After you run VsRegEx.exewith the GetOrig or GetLKG actions, you must run devenv.exe /setup /rootsuffix RootSuffix. If you do not do this, then the splash screen might be blank. By default, when RootSuffix is not specified in the VsRegEx arguments, Exp is used. When this is the case, you must run devenv.exe /setup /rootsuffix Exp /ranu.
See Also
Concepts
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Rewrote and refactored project. |
Content bug fix. |