1 year ago

#375054

test-img

Kevin Goyena

System.Diagnostics.Process.Start method is opening default browser on Windows 11

I have a WinForms C# app that runs fine on Windows 10, but on Windows 11, the app is triggering the opening of a default browser window. I believe it is the Start() method of System.Diagnostics.Process that is causing the problem. Here is my code.

Process ftpcopy = new Process();
ftpcopy.StartInfo.FileName = "ftpcopy.exe";
ftpcopy.StartInfo.Arguments = "ORGSHOWS " + _thisyear + " " + OrgID + " \"" + MainFolder + "\\\" \"" + TempFolder + "\"";
ftpcopy.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
ftpcopy.Start();

I'm trying to start ftpcopy.exe which is a program to do some folder creation and file copy work using FTP.

Any idea why the browser is getting started with this code?

c#

windows

system.diagnostics

0 Answers

Your Answer

Accepted video resources