title: How to run a command after a process was started by another process started by a batch file?
body: <p>Does anybody know how to create a batch for starting an application, then setting process priority of another application to a lower priority than normal, next waiting until one more process is started, and finally setting process priority of this last started process to a higher priority than normal?</p>
  <p>I would appreciate it if you would help me because this is for my business (Internet Cafe).</p>
  <p>So I need the batch file to start <strong>Valorant</strong> (technically the Riot client on <strong>Valorant</strong> config). Then set <strong>Chrome</strong> process to low process priority after user logged in and sets <strong>Valorant</strong> (technically <code>VALORANT-Win64-Shipping.exe</code>) to high process priority.</p>
  <p>Here are the commands required for the task.</p>
  <p>The command that runs <strong>Valorant</strong> (Riot login client) on cmd.</p>
  <pre><code>&quot;C:\Riot Games\Riot Client\RiotClientServices.exe&quot; --launch-product=valorant --launch-patchline=live
  </code></pre>
  <p>The command that sets <strong>Chrome</strong> to low priority (and stops <strong>Chrome</strong> from taking whole CPU resources of my PC.)</p>
  <pre><code>wmic process where name=&quot;chrome.exe&quot; call setpriority &quot;64&quot;
  </code></pre>
  <p>The command that sets <strong>Valorant</strong> (the game process) to high priority.</p>
  <pre><code>wmic process where name=&quot;VALORANT-Win64-Shipping&quot; call setpriority &quot;128&quot;
  </code></pre>
  <p>Further please note this: After the login client started, the game process doesn't start right away. There must be code added that waits for the game process to start after executing the first command which is basically my problem here.</p>
  <p>One more question:<br />
  Is this overclocking guide <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" rel="nofollow noreferrer">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a> true?<br />
  (I don't want my PC to explode and stuff.)</p>