title: Define virtual system variables for children applications
body: <p>I am currently working on a program that would run other application under given virtual environment. I am running another application like so:</p>
  
  <pre><code>Process app = new Process();
  app.StartInfo.FileName = @"W:\path\to\app\some.exe";
  app.EnableRaisingEvents = true;
  app.Start();
  </code></pre>
  
  <p>Now I have faced an issue to change some system variables for application to be run. I have googled for this and could not found the solution. Anybody has any idea how to solve this problem, please help me?<br>
  Thanks.</p>
  
  <p><strong>Update</strong></p>
  
  <p>For example I want to set another <code>PATH</code>, <code>JAVA_HOME</code>, <code>AppData</code> variable for child application. Application could be: <code>Google Chrome</code>, <code>Notepad++</code> or simple <code>.bat</code> script for command line.</p>