From df9391da76335a5b4987ffcdd8e95f9f94b33d3f Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Thu, 1 Jun 2017 04:21:25 -0400 Subject: [PATCH] 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. --- app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 85ee04ca0..889fa0402 100644 --- a/app/main.js +++ b/app/main.js @@ -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