jfromaniello / winser

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

winser crash on Windows Server 2008 R2 64bits #15

Closed cabrinoob closed 10 years ago

cabrinoob commented 11 years ago

Hi, I have tested my script on my Windows 7 64bits dev computer and it works. But when I try to deploy it on my Windows Server 2008 R2 it crashes with this error message :+1:

winser -r -x -s

couldn't determine the OSArchitecture with "wmic OS get OSArchitecture". Using 32 bit version

c:\myproject\project\node_modules\winser\bin\winser:91 var architecture = stdout.match(/(32:64)/)[1]; TypeError : Cannot read property '1' of null

jfromaniello commented 11 years ago

hi, could you try version v0.1.6 I just published,

Also, I would like to know what you get when running this on your prompt:

wmic OS get OSArchitecture
jfromaniello commented 11 years ago

what's the error you get on v0.1.6?

2013/8/30 cabrinoob notifications@github.com

Hi, still not working with the v0.1.6

C:\nodejs\proxyde>wmic OS get OSArchitecture Node - SRVDEV001 ERROR: Description = Invalid class

I'am looking for a doc on wmic under W2008 R2, but I did not found for now ...

— Reply to this email directly or view it on GitHubhttps://github.com/jfromaniello/winser/issues/15#issuecomment-23563317 .

cabrinoob commented 11 years ago

The same error than before. For info this server is a VM (Hyper-V)

cabrinoob commented 11 years ago

wmic CPU is working with this response :

C:>wmic CPU GET AddressWidth AddressWidth 64

cabrinoob commented 11 years ago

So, I just modified the #86 line in winser with this code :

exec('wmic CPU get AddressWidth', function(err, stdout, stderr) {

And it's working.