In case anyone comes around to this post later (like myself), the issues 
with C:\Program Files (x86)\ are typically permission related, especially 
if the process works from another directory. Even an account that has 
administrative privileges to create a process will choke in this directory. 
The command needs to be launched with elevated privileges, similar to how 
one would need to right click and select "Run as administrator". 

Personally, I got kind of fed up with this song and dance, so I wrote an 
npm module called node-windows, available at 
http://github.com/coreybutler/node-windows. It handles elevation 
automatically. At the moment, the module supports launching a script as a 
service from code. If enough people request a CLI utility to launch one-off 
processes, I'd be willing to include one in the distribution.

On Tuesday, February 14, 2012 7:54:30 PM UTC-6, Eric Jacobs wrote:
>
> After some more testing, it appears as though the node service just 
> doesn't work if the files are in `C:\Program Files (x86)\`. I told inno 
> setup to throw the files into `C:\thebus\` instead, and now everything is 
> working. Is there some sort of windows voodoo magic that you need to know 
> before you can run services from program files? Or is program files just 
> not the place to run services from?
>
> --
> Eric Jacobs
>
>
> On Tue, Feb 14, 2012 at 6:45 PM, Eric Jacobs <er...@chomp.us <javascript:>
> > wrote:
>
>> On Tue, Feb 14, 2012 at 6:35 PM, C. Mundi <cmu...@gmail.com <javascript:>
>> > wrote:
>>
>>> 1. What exactly does the Windows event log say when you drill into the 
>>> details?
>>>
>> Here is the basic run around i get from the event viewer (Event Viewer > 
>> Windows Logs > Application): 
>>  
>> * Started C:\Program Files (x86)\nodejs\node.exe C:\Program Files 
>> (x86)\spotterrf_node\static.js for service bus in C:\Program Files 
>> (x86)\nodejs.
>> * Killing process tree of process 168 for service bus with exit code 1
>> * Killing PID 168 in process tree of PID 168 because service bus is 
>> stopping.
>> * Program C:\Program Files (x86)\nodejs\node.exe for service bus exited 
>> with return code 1.
>> * Service bus action for exit code 1 is Restart. Attempting to restart 
>> C:\Program Files (x86)\nodejs\node.exe.
>> * Service bus ran for less than 1500 milliseconds. Restart will be 
>> delayed by 16000 milliseconds.
>>
>>> 2. Does it still crash if you bind it to a high (unprivileged) port?
>>>
>> Yes. Port number appears to make no difference.
>>
>> I'm not real sure what to think here either. I've been hammering away at 
>> this all afternoon and really have nothing to show for it. It seems like 
>> node is dying immediately after it starts, for some reason. Is anyone else 
>> on the list using windows services with node?
>>
>>
>> --
>> Eric Jacobs
>>
>
>

-- 
-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
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 nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to