Run as Normal User (RANU)

Running as a Normal User (RANU)

Programs that write to the local machine branch (HKLM) of the system registry require administrative permissions. The Visual Studio 2008 SDK is designed to enable VSPackage development without requiring administrative rights. Instead, VSPackage developers can run as normal users (RANU).

Beginning in the Visual Studio 2008 SDK, the experimental hive has been moved from the HKLM branch to the current user branch (HKCU) of the system registry. The locations are shown in the following table.

System Registry Branch

Meaning

HKLM\Software\Microsoft\VisualStudio\9.0

Normal hive.

HKCU\Software\Microsoft\VisualStudio\9.0

Normal user settings.

HKCU\Software\Microsoft\VisualStudio\9.0 Exp\UserSettings

User settings for experimental build. These include font cache, colors, window size, and location.

HKCU\Software\Microsoft\VisualStudio\9.0 Exp\Configuration

Experimental hive.

In addition, /RANU switches have been added to devenv.exe, RegPkg.exe, and other Visual Studio SDK utilities. When devenv.exe is started by using the /RANU switch, Visual Studio examines the HKCU branch for registered VSPackages, menus, and so forth.

Although these changes are intended to be invisible to the VSPackage developer, deployment of a VSPackage to another computer still requires administrative credentials.

Note

When the Visual Studio SDK is first installed it creates an experimental hive for the current developer. To add an experimental hive for another developer, click Start and then move to All Programs, then Visual Studio 2008 SDK, then Tools, and then click Reset the Visual Studio 2008 Experimental Hive.

Running as an Administrative User

If you wish to run as an administrative user, you must make the following changes to the configuration:

  • Create an experimental hive by running the following vsregex command:

vsregex getorig 9.0 exp

  • Remove the /ranu switch from the command line for all configurations.

  • In the project file, change the property RegisterWithCodebase to false, the property GacTargetOutput to true, and the property RegisterWithRANU to false.