Hey im just wondering would this work for running multiple CMD commands? I have not tested this yet.
//multiple commands
System::Diagnostics::Process ^process = gcnew System::Diagnostics::Process();
System::Diagnostics::ProcessStartInfo ^startInfo = gcnew System::Diagnostics::ProcessStartInfo();
//startInfo->WindowStyle = System::Diagnostics::ProcessWindowStyle::Hidden;
startInfo->FileName = "cmd.exe";
startInfo->Arguments = "/C powercfg -attributes SUB_PROCESSOR 12a0ab44-fe28-4fa9-b3bd-4b64f44960a6 -ATTRIB_HIDE";
startInfo->Arguments = "/C powercfg -attributes SUB_PROCESSOR 40fbefc7-2e9d-4d25-a185-0cfd8574bac6 -ATTRIB_HIDE";
process->StartInfo = startInfo;
process->Start();
Or does startInfo
only work with one argument at a time? If so how would I execute multiple commands without making a .bat
file and executing that.