On Windows, open installer using shell (allows elevation)

When you're just running a bare process, Windows can't show the "this
app wants elevated permissions" box and child_process.spawn throws an
error.
This commit is contained in:
Alex Liebowitz 2017-06-01 04:21:25 -04:00
parent e9dc3324cb
commit df9391da76

View file

@ -116,7 +116,7 @@ function openItem(fullPath) {
} else if (process.platform == 'linux') {
child = child_process.spawn('xdg-open', [fullPath], subprocOptions);
} else if (process.platform == 'win32') {
child = child_process.spawn(fullPath, [], subprocOptions);
child = child_process.spawn(fullPath, Object.assign({}, subprocOptions, {shell: true}));
}
// Causes child process reference to be garbage collected, allowing main process to exit