|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var regularpulltasks = function(){ return Promise.resolve(true) } |
|
|
var regularpulltasks = function(){ return Promise.resolve(true) } |
|
|
|
|
|
|
|
|
if(def.elevated){ |
|
|
if(def.elevated){ |
|
|
elevatedpulltasks = function() { |
|
|
elevatedpulltasks = function() { |
|
|
var eBatch = [] |
|
|
var eBatch = [] |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// if(elevatedpulltasks) return getTaskWithElevation( { elevatedpulltasks, regularpulltasks} ) |
|
|
// if(elevatedpulltasks) return getTaskWithElevation( { elevatedpulltasks, regularpulltasks} ) |
|
|
// else return getTaskWithoutElevation({ regularpulltasks}) |
|
|
// else return getTaskWithoutElevation({ regularpulltasks}) |
|
|
return any([ elevatedpulltasks, regularpulltasks ]) |
|
|
|
|
|
|
|
|
return elevatedpulltasks().then(()=>{ |
|
|
|
|
|
return shell_verse.isElevated().then((__isRunningElevated)=>{ |
|
|
|
|
|
if(isWin() && __isRunningElevated) return Promise.resolve(true); |
|
|
|
|
|
|
|
|
|
|
|
return regularpulltasks() |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// alert(objENV('wd')) |
|
|
// alert(objENV('wd')) |
|
|
// PB : TODO -- Convert all the cli args back to string. |
|
|
// PB : TODO -- Convert all the cli args back to string. |
|
|
// __filename will sure we are launhed using the same entry point. |
|
|
// __filename will sure we are launhed using the same entry point. |
|
|
var cargs = (processedArgs.debug ? '--inspect-brk=9228' : '') + ' ${__filename.replace(/\\/g, '\\\\')} ' + processedArgs._.join(' ') + ' ' + namedArgs.join(' '); |
|
|
|
|
|
|
|
|
var cargs = (processedArgs.debug ? '--inspect-brk=9226' : '') + ' ${__filename.replace(/\\/g, '\\\\')} ' + processedArgs._.join(' ') + ' ' + namedArgs.join(' '); |
|
|
var shell = new ActiveXObject('shell.application'); |
|
|
var shell = new ActiveXObject('shell.application'); |
|
|
// alert('launching node privilged. ' + processedArgs['nodepath']) |
|
|
// alert('launching node privilged. ' + processedArgs['nodepath']) |
|
|
// shell.ShellExecute('cmd.exe', '/k where node', '', '', 10); |
|
|
// shell.ShellExecute('cmd.exe', '/k where node', '', '', 10); |