質問

I have following code:

        var process = new Process
                    {
                        StartInfo = { FileName = "http://www.myurl.com", UseShellExecute = false }
                    };

                    process.Start(); <-- here exception
                    process.WaitForExit();//waits while process is finished

 //continues to execute

For some reason it throws "The system cannot find the file specified" error. What I want to do is after process.Start() is called, IE window is opened. Program waits, till user clicks "Confirm" button in IE window. As soon as this button clicked, program continues to execute.

役に立ちましたか?

解決

try

Process objProcess = Process.Start("IEXPLORE.EXE", "-nomerge http://google.com/");
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top