Compartir a través de


Detecting System Requirements

A VSPackage cannot function unless Visual Studio is installed. When you use Microsoft Windows Installer to manage the installation of your VSPackage, you can configure the installer to automatically detect whether Visual Studio is installed. You can also configure it to check the system for other requirements. for example, a particular version of Windows or a particular amount of RAM. You can also configure it to cancel the installation if the VSPackage requirements are not met.

Detecting editions and locales

To determine whether an edition of Visual Studio is installed, verify that the REG_DWORD registry value of "Install" is 1 for the appropriate key, as listed in the following table. To determine whether an edition is installed for a particular locale, use the same approach but append a locale ID (LCID) to the key that you're checking.

Visual Studio supports these LCIDs: 1028, 1029, 1031, 1033, 1036, 1040, 1041, 1042, 1045, 1046, 1049, 1055, 2052, 3082. For a list of all valid LCIDs, see Locale IDs Assigned by Microsoft.

Product

Key

Visual Studio Ultimate 2013

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\12.0\ultimate\LCID

Visual Studio Premium 2013

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\12.0\premium\LCID

Visual Studio Professional 2013

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\12.0\professional\LCID

Visual Studio 2013 Shell (integrated and isolated)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\12.0\isoshell\LCID

Note

In the 64-bit version of Registry Editor, 32-bit keys are displayed under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\. The Visual Studio keys are under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\.

Detecting Visual Studio 2013 Updates

To determine whether a Visual Studio update is installed, under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Microsoft Visual Studio 2013\vsupdate_KB2829760\, check for the Data value of the PackageVersion attribute, as shown here:

Update Name

PackageVersion Data Value

Update 1

12.0.30112

Update 2 RC

12.0.30324

Detecting When Visual Studio Is Running

Your VSPackage can't be registered correctly if Visual Studio is running when the VSPackage is installed. The installer must detect when Visual Studio is running and then refuse to install the program. Windows Installer doesn't let you use table entries to enable such detection. Instead, you must create a custom action, as follows: Use the EnumProcesses function to detect the devenv.exe process, and then either set an installer property that's used in a launch condition or conditionally display a dialog box that prompts the user to close Visual Studio.

See Also

Other Resources

Installing VSPackages With Windows Installer