Im creating the file msinfo :
ProcessRun.Processing(contentDirectory, "msinfo32.exe" , "/nfo " + "\"" + contentDirectory + "\\msinfo.nfo" + "\"",false,"");
This is the class that create and usig the process to create the file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.IO;
namespace Diagnostic_Tool_Blue_Screen
{
class ProcessRun
{
public void ProcessesRun()
{
}
public static void Processing(string WorkingDirectory, string FileName, string Arguments, bool StandardOutput, string OutputFileName)
{
Process proc = new Process();
proc.EnableRaisingEvents = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = StandardOutput;
proc.StartInfo.FileName = FileName;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.WorkingDirectory = WorkingDirectory;
proc.StartInfo.Arguments = Arguments;
proc.Start();
if (StandardOutput == true)
{
string output = proc.StandardOutput.ReadToEnd();
DumpOutput(WorkingDirectory + "\\" + OutputFileName, output);
}
proc.WaitForExit();
proc.Close();
}
private static void DumpOutput(string filename, string output)
{
StreamWriter w = new StreamWriter(filename);
w.Write(output);
w.Close();
}
}
}
Once the process start and running the msinfo32.exe there is a small window showing the process of the msinfo32.exe in the middle of the screen.
Its not the cmd window ! Its part of the msinfo32.exe Is there any way to hide this window while its Processing ?
Edited an image showing on the left my program and next to it on the right the small window of the msinfo32.exe that i want to hide.