On an internal list, the question of how to detect whether Team Explorer is installed came up.  I didn't know the answer, and I figure there are others that would like to know this.

To detect Team Explorer, look for the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\InstalledProducts\Team Explorer with a DWORD entry called UseInterface having a value of 1.

From the command line, you can use the reg command to query the registry.

D:\>reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\InstalledProducts\Team Explorer" /v UseInterface

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0InstalledProducts\Team Explorer
    UseInterface    REG_DWORD    0x1