Solution: Explorer open each folder in same window error and SQL Management Studio, IE and Team Explorer errors

Problem(s):

  • When attempting to open a folder in Windows Explorer, the folder opens in a new window, even if “Open each folder in the same window” is selected in Folder Options.
  • Some links in Internet Explorer don’t open correctly
  • Microsoft SQL Server Management Studio: An error with a message like “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)). (Microsoft.VisualStudio.OLE.Interop)
  • Visual Studio Team Explorer: When browsing using the Team Explorer window, you may get COM errors similar to those in the SQL Management Studio error above

Explanation:

I’m not sure of the exact details, but this is what I think I’ve found. Perhaps someone at Microsoft would correct or elaborate on this. Previously, actxprxy.dll (ActiveX Interface Marshaling Library) was used as the proxy for a multitude of system interfaces, such as IShellFolder and IServiceProvider. In Windows 7 (and probably Vista also), the GUID of this library has changed from {B8DA6310-E19B-11D0-933C-00A0C90DCAA9} to {C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6} Secondly, there is also a new Proxy/Stub provider found in ieproxy.dll of Internet Explorer (IE ActiveX Interface Marshaling Library). Some interfaces that previously used actxprxy.dll are now registered to use ieproxy.dll. Now various problematic software (such as Vault 3.x) will try to register against actxproxy using the old GUID, and for interfaces now proxied by ieproxy.dll.

Solution

Solution 1

You must use regsvr32 to re-register the two proxy DLLs, then reboot You can use the below batch file to do this. You must run this batch file with administrative privileges (right click on the file and choose Run as administrator): RunAsAdministrator If you don’t run the batch file as an administrator, you will get an error as pictured: ActxprxyRegisterError [Download RegisterActxprxyAndIeproxy.cmd] RegisterActxprxyAndIeproxy.cmd source:
@echo off

:: 32 bit and 64 bit
IF EXIST "%SystemRoot%System32actxprxy.dll" "%SystemRoot%System32regsvr32.exe" "%SystemRoot%System32actxprxy.dll"
IF EXIST "%ProgramFiles%Internet Explorerieproxy.dll" "%SystemRoot%System32regsvr32.exe" "%ProgramFiles%Internet Explorerieproxy.dll"

:: 64 bit only (32bit on 64 bit)
IF EXIST "%WinDir%SysWOW64actxprxy.dll" "%WinDir%SysWOW64regsvr32.exe" "%WinDir%SysWOW64actxprxy.dll"
IF EXIST "%ProgramFiles(x86)%Internet Explorerieproxy.dll" "%WinDir%SysWOW64regsvr32.exe" "%ProgramFiles(x86)%Internet Explorerieproxy.dll"
Don’t forget to reboot after re-registering the DLLs! Edit: The script has been updated to support 64-bit Windows

Solution 2

Some people have reported that  the following command may fix the problem when Solution 1 does not work (first mentioned by snir in the comments):
  1. Open up a Command Prompt (presumably in Administrator  mode) Start > Programs > Accessories > Command Prompt
  2. Type in sfc /scannow and hit Enter
For those for which this solution works, I’d like for someone to find what file(s) were affected and repaired, so we can get a more specific solution and see if it’s related to Solution 1. This solution was one I looked at before I made this post which did not work for me. ]]>

Using batch parameter modifiers to get specific portions or file info from a full filename

Using batch parameters [microsoft.com]:

Cmd.exe provides the batch parameter expansion variables %0 through %9. When you use batch parameters in a batch file, %0 is replaced by the batch file name, and %1 through %9 are replaced by the corresponding arguments that you type at the command line
These batch parameter modifiers variable arguments are immensely useful. That document is missing some examples, so I’ve put together a simple table:

%1

Original argument

“C:UsersDMooreDocumentsDocument Name.txt”

%~1

Expands %1 and removes any surrounding quotation marks (“”).

C:UsersDMooreDocumentsDocument Name.txt

%~f1

Expands %1 to a fully qualified path name.

C:UsersDMooreDocumentsDocument Name.txt

%~d1

Expands %1 to a drive letter.

C:

%~p1

Expands %1 to a path.

UsersDMooreDocuments

%~n1

Expands %1 to a file name.

Document Name

%~x1

Expands %1 to a file extension.

.txt

%~s1

Expanded path contains short names only.

C:UsersDMooreDOCUME~1DOCUME~1.TXT

%~a1

Expands %1 to file attributes.

–a——

%~t1

Expands %1 to date and time of file.

19/08/2009 02:53 p.m.

%~z1

Expands %1 to size of file. (bytes)

9

]]>