Reputation: 11045
I am creating a batch file and I need to know if Visual Studio 2010 SP1 (VC10) x64 is installed before starting some applications that requires it. What places from the registry or the filesystem could confirm me that it is installed?
Upvotes: 4
Views: 1696
Reputation: 172628
Check HOWTO: Detect installed Visual Studio editions, packages or service packs
You may find this helpful for you.
The detection keys for Visual Studio are used both to detect if the product is installed and what service pack level is installed. As with previous versions, these keys and values are under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VS\Servicing.
Key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VS\Servicing\10.0\$(var.ProductEdition)\$(var.LCID)
Name Install
Type REG_DWORD (32-bit integer)
Data 0x00000001 (1)
Upvotes: 2
Reputation: 1047
You can iterate over every single key under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
And look in the DisplayName (REG_SZ) registry.
This is where the Program and Features application gets the information to populate the list of all software currently installed on Windows.
Upvotes: 0