82
rated 0 times
[
88]
[
6]
/ answers: 1 / hits: 6557
/ 11 Years ago, sun, january 26, 2014, 12:00:00
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
var spawn = require('child_process').spawn;
spawn('chrome',[], {cwd: '%LOCALAPPDATA%\Google\Chrome\Application', env: process.env})
instead of
var spawn = require('child_process').spawn;
spawn('chrome',[], {cwd: 'C:\Usersmyuser\AppData\Local\Google\Chrome\Application', env: process.env}).
Is there a package I can use in order to achieve this?
More From » node.js