From ccef599bcf31752edb526f0791f064ff8b120dda Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 4 May 2016 01:35:19 -0400 Subject: [PATCH] Fix application not being elevated in Windows (#393) After elevation routine refactoring, it looks like we have to exit the parent process after a short while, otherwise it kills the app before the elevated child process is executed. Signed-off-by: Juan Cruz Viotti --- lib/src/elevate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/elevate.js b/lib/src/elevate.js index a565f886..e5e9592b 100644 --- a/lib/src/elevate.js +++ b/lib/src/elevate.js @@ -55,7 +55,9 @@ exports.require = function(app, applicationName, callback) { }).then(function() { // Don't keep the original parent process alive - process.exit(0); + setTimeout(function() { + process.exit(0); + }); });