Every once in a while, and especially when I build virtual machines from existing images, I run into a weird error when running SQL Server Management Studio:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
With a little google-ing around did find a solution, well, actually two.
Once solution involves running an update to some registry keys (which is what always works for me) and the second a re-registration of a DLL (you've gotta love COM).
Option 1
As I mentioned earlier, this option always worked form me, and therefore I have never had to resort to option 2.
First, copy the following code snippet and paste it into a text file. Then rename the *.txt file you copied the snippet to, and rename to *.reg.
Now run the fix by double-clicking on the *.reg file and voila'.
You'll get a message prompt telling you whether or not the registry was successfully update.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-
8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-
8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-
8034-00AA006009FA}\ProxyStubClsid32]
@="{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}"
[HKEY_CURRENT_USER\Software\Classes\Interface\{6D514
0C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_CURRENT_USER\Software\Classes\Interface\{6D514
0C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_CURRENT_USER\Software\Classes\Interface\{6D514
0C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D51
40C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D51
40C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D51
40C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}"
PLEASE NOTE: I strongly suggest you back up your registry, as I take NO responsibility it is breaks anything :-)
Option 2
If option one failed to resolve your problem, then try running the following regsvr32 command:
C:\WINDOWS\system32>regsvr32 actxprxy.dll
One last thing to mention is that no one seems to know or remotely understand what causes this issue.
Additional information can be found here: http://forums.microsoft.com/msdn/showpost.aspx?postid=120476&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=0