title: Setting environment variables with batch file lauched by Powershell script
body: <p>I have a batch script called SET_ENV.bat which contains environment variables that are used by other batch scripts. Currently this SET_ENV.bat is lauched by existing batch scripts.</p>
  
  <p>Now I have a need to use Powershell script and I would like to launch the same SET_ENV.bat. I managed to do this using:</p>
  
  <pre><code>cmd.exe /c ..\..\SET_ENV.bat
  </code></pre>
  
  <p>I know that the batch file was run because it contained an echo </p>
  
  <pre><code>echo *** Set the environment variables for the processes ***
  </code></pre>
  
  <p>But after looking at the environment variables, I can see that none of them have been updated. Is there something that is preventing me from updating environment variables with Powershell + batch file combo?</p>
  
  <p>I have tried SET_ENV.bat directly from command line and it works. I have also tried Start-Process cmdlet with "-Verb runAs" but that didn't do any good.</p>