Everything else but Spotify starts up hidden. (Spotify is downloaded from the Microsoft Store)
I only wrote "spotify.exe" at Process.Start();
because it was in the PATH.
static void performanceMode()
{
//Hide Console
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
process.StartInfo = startInfo;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe"; //Starts hidden.
startInfo.Arguments = "/C powercfg /s 0776b752-5add-4983-8d52-f7370e479b36";
process.Start();
startInfo.Arguments = "";
startInfo.FileName = "spotify.exe"; //Doesn't start hidden.
process.Start();
startInfo.FileName = "C:\\Program Files (x86)\\Skillbrains\\lightshot\\Lightshot.exe"; //Starts hidden.
process.Start();
startInfo.FileName = "C:\\Program Files\\LGHUB\\lghub.exe"; //Starts hidden.
process.Start();
}
static void Main(string[] args)
{
performanceMode();
}