Pablo Galiano : The /RANU switch

Subscriptions

<July 2010>
SuMoTuWeThFrSa
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

News

Subscribe to Pablo Galiano by Email

Post Categories

The /RANU switch

The Run as Normal User (RANU) switch is part of the VS 2008  since beta 1. Aaron and Deepankar already blogged about this a couple of months ago.

In the context of VSX, RANU basically means "load my Vs Package registration information from HKCU instead of HKLM hive", or:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0Exp\Configuration

Instead of:

HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0

As pointed by Aaron, this is only for development scenarios. Package deployment is still under the HKLM hive and you will need Administrator privileges.

To support the HKCU hive and the RANU switch several tools where modified:

  • devenv.exe itself
  • RegPkg.exe or the package registration tool
  • VSRegEx.exe or the reset experimental hive tool

This is the default VSX package registration method no matter which OS is used on the development machine. The VS SDK shortcuts and VSX package project templates had been updated to reflect this registration method.

The RANU switch is only applicable for the experimental hive, so if for some specific reason we want to register a package on the normal hive on our development environment, we need to manually edit the csproj file and add the following lines:

<PropertyGroup>
  <TargetRegistryRoot>Software\Microsoft\VisualStudio\9.0</TargetRegistryRoot>
  <RegisterWithRanu>false</RegisterWithRanu>
</PropertyGroup>

Of course if you need to integrate a GAX guidance package with a VSX package (for ex a DSL) you should take this into account. You basically need to register the GP on the Exp hive with the RANU switch.

 

Pablo

posted on Monday, October 01, 2007 7:20 PM by pga