J
J
John2021-07-16 15:45:21
C++ / C#
John, 2021-07-16 15:45:21

Why are commands executed in win 10, but deaf in 7?

Broke my whole head. Why does this code work in win 10, but not in win 7?

var process = new Process
                        {
                            StartInfo = new ProcessStartInfo
                            {
                                FileName = "cmd.exe",
                                RedirectStandardInput = true,
                                UseShellExecute = false,
                                CreateNoWindow = false
                            }
                        };
                        process.Start();
                        process.StandardInput.WriteLine("notepad.exe");

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question