0

I want to put an option in my program that the sysmon program, which must be installed via cmd, be installed automatically. To install, you need the sysmon.exe file, which I included in the program.

Normally the sysmon program is installed in cmd with the following command (In the sysmon folder )

sysmon64.exe -i

Now how do I run this command in C #? The following commands are used to run the cmd program in C #. I just do not know how to introduce the sysmon64 file that I included in the program into the cmd.

    System.Diagnostics.Process process = new System.Diagnostics.Process();
    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
    startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    startInfo.FileName = "cmd.exe";
    startInfo.Arguments = ???
    process.StartInfo = startInfo;
    process.Start();
Reza
  • 1
  • It is already solved in this thread: https://stackoverflow.com/questions/7008647/running-exe-with-parameters/7008741 As mentioned, you might try use: `System.Diagnostics.Process.Start("sysmon64.exe", "-i");` – Bartosz Olchowik Jan 03 '22 at 07:58

0 Answers0