public static bool ToggleDedicatedGPU(bool enable, string binPath = null)
 {
     try
     {
         if (binPath == null)
         {
             binPath = Path.Combine(RegistryStrings.InstallDir, "HD-ForceGPU.exe");
         }
         string args = enable ? "1" : "0";
         return(RunCommand.RunCmd(binPath, args, true, true, false, 0).ExitCode == 0);
     }
     catch (Exception ex)
     {
         Logger.Error("An error occured while running {0}, Ex: {1}", (object)binPath, (object)ex);
     }
     return(false);
 }
 public static CmdRes GetTaskQueryCommandOutput(string taskName)
 {
     return(RunCommand.RunCmd(TaskScheduler.BinaryName, TaskScheduler.QueryTaskArguments(taskName), false, true, false, 0));
 }
 private static int RunSchedulerCommand(string args)
 {
     return(RunCommand.RunCmd(TaskScheduler.BinaryName, args, true, true, false, 0).ExitCode);
 }