Lucio and I worked on a windows explorer solution and I have some working c# source code that lets you open and close a windows explorer window to a passed in folder name
*******************
Starting explorer
********************
using System;
using System.Diagnostics;
using System.ComponentModel;
//open windows explorer to the folder passed in - the folder has to exist
string folderToOpen = &(1:).Value;
//define explorer.exe folder
string windir = Environment.GetEnvironmentVariable("WINDIR");
System.Diagnostics.Process explorerProcess = new System.Diagnostics.Process();
explorerProcess.StartInfo.FileName = windir + @"\explorer.exe";
//
explorerProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
explorerProcess.StartInfo.Arguments = folderToOpen;
explorerProcess.StartInfo.UseShellExecute = false;
explorerProcess.Start();
// return current window title - may or may not be useful
string title = explorerProcess.MainWindowTitle;
&(2:).Value = title;
*******************
Ending Explorer
******************
using System;
using System.Diagnostics;
using System.ComponentModel;
string explorerDirectory = &(1:).Value;
//get all other (possible) running instances of explorer
Process[] processes = Process.GetProcessesByName("explorer");
foreach (Process explorerProcess in processes)
{
//the MainWindowTitle is the folder/directory the ExplorerWindow has opened
string title = explorerProcess.MainWindowTitle;
if (explorerDirectory == title)
{
explorerProcess.Kill();
}
}