次の方法で共有


Developing Packages as a Normal User (or How I Learned to Love UAC)

By now if you've had a chance to use Windows Vista, you've undoubtedly witnessed UAC in action. Certainly, if you're doing VS package development on Vista, you've had to elevate your instance of Visual Studio where you're coding so that build/registration works properly.

Starting with the Visual Studio 2008 SDK - June 2007 CTP, we have introduced the first round of changes that will enable developing a package as a normal user (therefore not requiring you elevate a process via UAC prompt).

Disclaimer: This will only be for development scenarios. Visual Studio Package deployment/installation will still require writing to HKLM, and therefore, require Administrator rights on an end-user machine.

A new switch has been added to Visual Studio (and many of our VSPackage tools) called "/RANU" (Run As Normal User) which causes Visual Studio to look in a slightly different location for information. In a typical Visual Studio 2008 session, information is read from the registry in the following two locations:

Package Registration : HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0
User Settings: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0

When running with the /RANU switch (along with /rootsuffix Exp in this case), Visual Studio will instead look in the following locations:

Package Registration : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0Exp\Configuration
User Settings: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0Exp\UserSettings

There are still some issues in both VS 2008 Beta 1 and our current CTP that prevent this from working perfectly (e.g. samples get installed/built in Program Files/C++ 'archive' samples are broken), but it generally works and these remaining bugs will be ironed out in the coming months. (The main issue is that running "devenv /setup /ranu" fails on Beta 1 unless you are an administrator. This has already been fixed in our internal builds for Beta 2.)

Please let us know if you discover any issues in this slightly different package development model.

Comments

  • Anonymous
    February 07, 2008
    If you open and build one of the samples in the Visual Studio 2008 SDK, and see the following error,
  • Anonymous
    February 07, 2008
    If you open and build one of the samples in the Visual Studio 2008 SDK, and see the following error,
  • Anonymous
    August 15, 2008
    It’s really useful to know the current registry hive when, for example, when you’re running Visual Studio
  • Anonymous
    October 08, 2008
    First of all a quick overview, I made a VSIP package which originally addresses just Visual Studio 2005
  • Anonymous
    June 05, 2009
    ***Disclaimer: This information is about Visual Studio 2010 Beta 1 only. The following may not be accurate