When I open windows explorer from c# using the following code the navigation bar keeps expanding to the current folder. I want to stop this.
var processStartInfo = new ProcessStartInfo(@"C:\Users");
Process.Start(processStartInfo);
I think you need to modify registry.
NavPaneExpandToCurrentFolder
to 0
NavPaneExpandToCurrentFolder
Use following code to modify registry:
using Microsoft.Win32;
const string key = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";
int enabled = 1; // 0 to disable
Registry.SetValue(key, "NavPaneExpandToCurrentFolder", enabled, RegistryValueKind.DWord);