Freigeben über


How to: Manage a Private Gallery By Using Registry Settings.

If you are an administrator or the developer of an Isolated Shell extension, you can control access to the controls, templates, and tools in the Visual Studio Gallery, the Samples Gallery, or private galleries. To make a gallery available or unavailable on a computer, modify the system registry. To accomplish this for multiple computers, create a .pkgdef file or group policy that describes the modified registry keys and their values.

You can configure the following settings for all users of a computer:

  • Disable access to the Visual Studio Gallery or the Samples Gallery.

  • Add a private gallery.

Managing Private Galleries

You can create a .pkgdef file to control access to galleries on multiple computers by modifying the system registry on every computer. This file must have the following format.

[$RootPath$\ExtensionManager\Repositories\{UniqueGUID}]
@={URI}  (REG_SZ)
Disabled=0 | 1 (DWORD)
Priority=0 (highest priority) … MaxInt (lowest priority) (DWORD) (uint)
Protocol=Atom|Sharepoint (REG_SZ)
DisplayName={DisplayName} (REG_SZ)
DisplayNameResourceID={ID} (REG_SZ)
DisplayNamePackageGuid={GUID} (REG_SZ)

The Repositories key refers to the gallery to be enabled or disabled. The Visual Studio Gallery and the Samples Gallery use the following repository GUIDs:

  • Visual Studio Gallery : 0F45E408-7995-4375-9485-86B8DB553DC9

  • Samples Gallery : AEB9CB40-D8E6-4615-B52C-27E307F8506C

The Disabled value is optional. By default, a gallery is enabled.

The Priority value is based on the order in which the galleries are listed in the Options dialog box. Visual Studio Gallery has priority 10 and the Samples Gallery has priority 20. Private galleries start at priority 100. If several galleries have equal priority values, the order in which they appear is determined by the values of their localized DisplayName attributes. Galleries that do not have a Priority value appear at the end of the list.

The Protocol value is required for Atom-based or SharePoint-based galleries.

Either DisplayName, or both DisplayNameResourceID and DisplayNamePackageGuid, must be specified. If all are specified, then the DisplayNameResourceID and DisplayNamePackageGuid pair is used.

Common Tasks

Many common tasks can be accomplished by a single line in the .pkgdef file.

[$RootPath$\ExtensionManager\Repositories\{0F45E408-7995-4375-9485-86B8DB553DC9}]
"Disabled"=dword:00000001
[$RootPath$\ExtensionManager\Repositories\{AEB9CB40-D8E6-4615-B52C-27E307F8506C}]
"Disabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\ ExtensionManager\Repositories\{0F45E408-7995-4375-9485-86B8DB553DC9}]
"Disabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\ ExtensionManager\Repositories\{AEB9CB40-D8E6-4615-B52C-27E307F8506C}]
"Disabled"=dword:00000001

See Also

Other Resources

Private Galleries