I execute JS file with cmd command in c# and i want when it stop the cmd is useless and exit automatically. It's possible to do it without a batch file?
public static void ExecuteCommand(string command)
{
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 = command;
process.StartInfo = startInfo;
process.Start();
}