0

I am developing a shell extension and I need to open windows explorer (explorer.exe) in managed context (.net 4 runtime). I have created explorer.exe.config file and have placed in %windir%. The contents of explorer.exe.config file is as below.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup> 
    <requiredRuntime imageVersion="v4.0.30319" version="v4.0.30319" />
    <supportedRuntime version="v4.0.30319" />
</startup>
</configuration>

However, explorer does not open in the .net runtime. Is there any better way to do this?

To be more clear, I want explorer.exe and its type to "Managed" in the "Attach to Process" window.

"Attach to Process" window in Visual Studio showing explorer.exe as managed type

Thanks in advance.

utkarsh
  • 588
  • 1
  • 7
  • 18
  • Why would you create `explorer.exe.config`? It doesn't make sense. – Alvin Wong Feb 09 '13 at 07:28
  • I have added the comment below. I am following these steps based on the component's help. It works for me sometimes as I am able to debug my shell extension. However it is not consistent. – utkarsh Feb 09 '13 at 15:15

1 Answers1

0

You can use Process.Start as described here, but explorer isn't a .NET executable, so any attempt to force it to use a .config file will likely not work. What is it you're trying to achieve?

Community
  • 1
  • 1
Echilon
  • 10,064
  • 33
  • 131
  • 217
  • I am going by the documentation of a library I am using. EZShellExtensions.net (http://www.ssware.com/ezshell/ezshell.htm). Basically it helps me to use .NET runtime. explorer.exe.config helps me to load the explorer in managed mode. I am even able to debug my extension. However it is not consistent. Hence the question. – utkarsh Feb 09 '13 at 15:13
  • @UtkarshShigihalli - You should add this information to your question. – Walter Mar 01 '13 at 12:06