title: How to resolve a path that includes an environment variable, in nodejs?
body: <p>I would like to run an executable and its path contains an enviroment variable, for example if I would like to run chrome.exe I would like to write something like this</p>
  
  <pre><code>var spawn = require('child_process').spawn;
  spawn('chrome',[], {cwd: '%LOCALAPPDATA%\\Google\\Chrome\\Application', env: process.env})
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>var spawn = require('child_process').spawn;
  spawn('chrome',[], {cwd: 'C:\\Users\myuser\\AppData\\Local\\Google\\Chrome\\Application', env: process.env}).
  </code></pre>
  
  <p>Is there a package I can use in order to achieve this?</p>