jfromaniello / winser

Run a node.js application as a window service using nssm.
270 stars 47 forks source link

Error in architecture detection under Windows Server 2008 Standard #12

Closed eddie168 closed 11 years ago

eddie168 commented 11 years ago

At node_modules\winser\bin\winser:87, I need to change the regular expression from

var architecture = stdout.match(/([2346]{2})\-Bit/)[1];

to

var architecture = stdout.match(/([2346]{2})\-[bB]it/)[1];

since Windows Server 2008 return "64-bit" instead of "64-Bit".

jfromaniello commented 11 years ago

I think we should use this

http://nodejs.org/api/process.html#process_process_arch

jfromaniello commented 11 years ago

@Dignifiedquire do you remember why you used wmic OS get OSArchitecture instead of node.js process.arch?

dignifiedquire commented 11 years ago

The problem is that the process architecture can differ from the os architecture which is what we really want to know. E.g. node 32bit would give 32bit process.arch even if it's running on a 64bit machine. os.arch should solve that but doesn't right now see this issue https://github.com/joyent/node/issues/2862

On Wed, Apr 17, 2013 at 1:42 PM, José F. Romaniello notifications@github.com wrote:

@Dignifiedquire do you remember why you used wmic OS get OSArchitecture instead of node.js process.arch?

Reply to this email directly or view it on GitHub: https://github.com/jfromaniello/winser/issues/12#issuecomment-16500793

jfromaniello commented 11 years ago

thanks @Dignifiedquire it makes sense,

@eddie168 fixed in 0.1.2

eddie168 commented 11 years ago

Thanks for the quick fix!