How to Open the Explorer on the Windows 11

73 Views Asked by At

I am trying to open the windiws explorer using c# in windows 11 but the File Explorer opens briefly and then closes without displaying the window while still showing in the task manager, please help me to solve

NB: The same code working perfectly in Windows 10

var myFile = "C:\\Windows\\explorer.exe";
var workingFolder = "C:\\Windows";
var process = new ProcessStartInfo();
process.FileName = myFile;
process.WorkingDirectory = workingFolder;
process.UseShellExecute = false;
process.Arguments = "d:\\";
Process.Start(process);
0

There are 0 best solutions below