Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Service not working on Windows 8.1 and .NET 4.5 #47

Open
marcofranssen opened this issue Feb 19, 2014 · 5 comments · May be fixed by #268
Open

Install Service not working on Windows 8.1 and .NET 4.5 #47

marcofranssen opened this issue Feb 19, 2014 · 5 comments · May be fixed by #268

Comments

@marcofranssen
Copy link

I tried following script to run another node package as a service. Opened my nodejs commandprompt as administrator so I have the elevated rights. Nothing is happening. No Service running, no console output, no nothing. Let me know how I can get you more information.

var Service = require('node-windows').Service;

// Create a new service object
var svc = new Service({
    name: 'Subway IRC',
    description: 'IRC client in the browser, running on port 3000',
    script: 'E:\\subway\\subway'
});

// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install', function() {
    console.log('Service "%s" installed', svc.name);
    svc.start();
    console.log('Service "%s" started', svc.name);
});

svc.install();
@bwalks
Copy link

bwalks commented Apr 11, 2014

It looks like the exe it ships with requires .NET 2.0. You can install .NET 3.5 (which includes 2.0) to get it to work.

@ekelvin
Copy link

ekelvin commented Apr 15, 2014

Same issue with windows server data center 2012. It needs .net 2.0 or .net 3.5
I think this should be mentioned as prerequisites in the installation section

@scarletsky
Copy link

Same issue on windows server 2008 r2. The machine has installed .net 4.5 ......

@arthurblake
Copy link

This is a simple winsw configuration issue. WINSW will run fine under .NET 4+ if you supply one extra configuration file. See https://github.com/kohsuke/winsw#net-runtime-40

In my opinion, for simplicity, the extra config file should just always and automatically be generated on install, since there is no real downside to having it (it still works properly in .NET 2.0 environments with or without the file.)

This simplifies node-windows configuration (by not requiring anything extra at all), so it just works out of the box on newer windows systems.

This is the approach I took recently in my fork at https://github.com/arthurblake/node-windows and it's working well for me.

@styfle
Copy link

styfle commented Jul 19, 2016

I get this when installing on Windows Server 2012 R2 Datacenter.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants