I need to launch an external program, but I'm hitting a roadblock because 
that external program requires elevated privileges. Normally I would just 
do this:

require('child_process').spawn('C:\\Users\\me\\AppData\\Local\\Temp\\1131128-16232-bid56z__some_installer.exe');

But this throws an error because the external program requires elevated 
privileges. Some have suggested that I use the "runas" command, but I 
haven't had much success yet. No error is thrown, but the external program 
doesn't run either.

require('child_process').spawn('runas', 
['/user:my_machine_name\\administrator', 
'C:\\Users\\me\\AppData\\Local\\Temp\\1131130-18300-1wol3cr__some_installer.exe']);

I've also been trying the node-window module's "elevate" method. It seems 
to use batch and VB scripts to do its magic, and it comes very close to 
solving my problem. The issue with this solution is that the child 
process's "close" and "exit" events seem to trigger immediately, and I lose 
all communication with the child process. I presume this is because the 
child process is aware of only the batch cmd or vbs and not my actual 
external program.

For the moment, I'm at a dead end. I'm very much hoping someone has an 
ingenious idea.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to