|  |  | @@ -404,8 +404,8 @@ var getPullTask = (repodef, branch, repoowner, errHandler, elevatedBatch, regula | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | if (exists) { | 
		
	
		
			
			|  |  |  | var branchprint =  branch ? ' branch :' + branch  : ''; | 
		
	
		
			
			|  |  |  | console.log('pulling ' + instanceroot + '/' + repo + branchprint ) | 
		
	
		
			
			|  |  |  | var task = ()=>{ | 
		
	
		
			
			|  |  |  | console.log('pulling ' + instanceroot + '/' + repo + branchprint ) | 
		
	
		
			
			|  |  |  | return nodeShellExec.apply(null, getPullCmd(repo, branch)).then(() => { | 
		
	
		
			
			|  |  |  | return true; | 
		
	
		
			
			|  |  |  | }) | 
		
	
	
		
			
			|  |  | @@ -413,6 +413,7 @@ var getPullTask = (repodef, branch, repoowner, errHandler, elevatedBatch, regula | 
		
	
		
			
			|  |  |  | initTask(task) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | if(repodef.requiresElevation) { | 
		
	
		
			
			|  |  |  | if(elevatedBatch.length === 1) {  initTask(elevatedBatch[0]) } // PB : TDOO -- Make sure first task also has run context. May need to be moved to win_verse | 
		
	
		
			
			|  |  |  | elevatedBatch.push(shell_verse.getElevatedTask( task )); | 
		
	
		
			
			|  |  |  | return elevatedBatch[elevatedBatch.length-1] | 
		
	
		
			
			|  |  |  | } | 
		
	
	
		
			
			|  |  | @@ -2373,7 +2374,7 @@ var elxr = { | 
		
	
		
			
			|  |  |  | // shell_verse.getElevatedTask( t1 ) | 
		
	
		
			
			|  |  |  | var eBatch = [] | 
		
	
		
			
			|  |  |  | def.elevated.map((def) => getPullTask(def, null, null, null, eBatch)) | 
		
	
		
			
			|  |  |  | return any(shell_verse.runElevatedBatch(eBatch)).then(() => { | 
		
	
		
			
			|  |  |  | return shell_verse.runElevatedBatch(eBatch).then(() => { | 
		
	
		
			
			|  |  |  | return true; | 
		
	
		
			
			|  |  |  | }).catch((e) => { | 
		
	
		
			
			|  |  |  | console.error(e) | 
		
	
	
		
			
			|  |  | @@ -2425,7 +2426,11 @@ function elxrworker() { | 
		
	
		
			
			|  |  |  | // --runas | 
		
	
		
			
			|  |  |  | if (processedArgs.runas) { | 
		
	
		
			
			|  |  |  | // Weve been asked to run in priviledged mode. Check if we already are privileged. | 
		
	
		
			
			|  |  |  | return __runcmd('runas') | 
		
	
		
			
			|  |  |  | // return __runcmd('runas') | 
		
	
		
			
			|  |  |  | // we no longer have a runas function. This has been moved to shellverse.requestElevation... | 
		
	
		
			
			|  |  |  | // Each task has knowledge of requiring elevation and will handle elevation requests as needed. Preferably the task will participate in a batch and queue itself. | 
		
	
		
			
			|  |  |  | // | 
		
	
		
			
			|  |  |  | return __runcmd(processedArgs.label || processedArgs._[0] || 'undefined'); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | else return __runcmd(processedArgs.label || processedArgs._[0] || 'undefined'); | 
		
	
		
			
			|  |  |  | } | 
		
	
	
		
			
			|  |  | @@ -3995,7 +4000,7 @@ var maintask = () => { | 
		
	
		
			
			|  |  |  | return prerequisites.git.verifyAndInstall().then(()=>{ | 
		
	
		
			
			|  |  |  | var e = { message : 'verifyAndInstall', success : true} | 
		
	
		
			
			|  |  |  | var inittasks = [] | 
		
	
		
			
			|  |  |  | var commantask = () => { preworkerconfig(); return elxrworker(true) } | 
		
	
		
			
			|  |  |  | var commontask = () => { preworkerconfig(); return elxrworker(true) } | 
		
	
		
			
			|  |  |  | if(!detection_state.localInstanceDetected) { | 
		
	
		
			
			|  |  |  | var t1 = ()=>{ return createInstance(selectedinstance) }; | 
		
	
		
			
			|  |  |  | t1.statuslog = statuslog | 
		
	
	
		
			
			|  |  | @@ -4007,10 +4012,10 @@ var maintask = () => { | 
		
	
		
			
			|  |  |  | var specifictask = shell_verse.getNonElevatedTask(t2) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | inittasks.push(  specifictask().catch((err) => { | 
		
	
		
			
			|  |  |  | e = err; | 
		
	
		
			
			|  |  |  | console.error('Chosen cofiguraton failed or not found. Fix config and rerun or chose another.') | 
		
	
		
			
			|  |  |  | console.error(err) | 
		
	
		
			
			|  |  |  | }).then( commantask ) | 
		
	
		
			
			|  |  |  | e = err; | 
		
	
		
			
			|  |  |  | console.error('Chosen cofiguraton failed or not found. Fix config and rerun or chose another.') | 
		
	
		
			
			|  |  |  | console.error(err) | 
		
	
		
			
			|  |  |  | }).then( commontask ) | 
		
	
		
			
			|  |  |  | // .finally(()=>{ | 
		
	
		
			
			|  |  |  | //   fs.writeFileSync('run.log', ', ' + JSON.stringify({ error: e.message }), { 'flag': 'a+' }) | 
		
	
		
			
			|  |  |  | //   if(!e.success) fs.writeFileSync('run.done', 'error'); | 
		
	
	
		
			
			|  |  | @@ -4092,13 +4097,14 @@ function generateDependencies(){ | 
		
	
		
			
			|  |  |  | // PB : TODO -- Convert all the cli args back to string. | 
		
	
		
			
			|  |  |  | // __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(' '); | 
		
	
		
			
			|  |  |  | // alert(cargs) | 
		
	
		
			
			|  |  |  | var shell = new ActiveXObject('shell.application'); | 
		
	
		
			
			|  |  |  | // alert('launching node privilged. ' + processedArgs['nodepath']) | 
		
	
		
			
			|  |  |  | // shell.ShellExecute('where', 'node', '', '', 10); | 
		
	
		
			
			|  |  |  | // shell.ShellExecute('cmd.exe', '/k where node', '', '', 10); | 
		
	
		
			
			|  |  |  | // shell.ShellExecute('cmd.exe', '/k notepad.exe', '', 'runas', 1); | 
		
	
		
			
			|  |  |  | // shell.ShellExecute('cmd.exe ', '/k node "' + cargs + '"', '', 'runas', 1); | 
		
	
		
			
			|  |  |  | // shell.ShellExecute('cmd.exe ', '/k node ', '', 'runas', 1); | 
		
	
		
			
			|  |  |  | // shell.ShellExecute('cmd.exe ', '/k node ' + cargs + '', '', 'runas', 1); | 
		
	
		
			
			|  |  |  | shell.ShellExecute('node', cargs, '', 'runas', 1); | 
		
	
		
			
			|  |  |  | // alert('/k node ' + cargs + '') | 
		
	
		
			
			|  |  |  | // shell.ShellExecute(processedArgs['nodepath'], cargs, '', 'runas', 1); | 
		
	
		
			
			|  |  |  | var fso = new ActiveXObject('Scripting.FileSystemObject'); | 
		
	
		
			
			|  |  |  |  |