coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.8k stars 356 forks source link

Error during installation #162

Closed mpastrello closed 7 years ago

mpastrello commented 7 years ago

During the service installation to another client with installutil.exe command returns an error "No public installer with the attribute RunInstallerAttribute.yes was found in the assembly c: \ work \ helloword.exe."

I found the article that solves the problem if the service was in c #: https://msdn.microsoft.com/it-it/library/ddhy0byf.aspx

What should I add to the configuration?

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

// Create a new service object var svc = new Service ({ name: 'Hello Word', description: 'test service', script: 'C: \ work \ app.js', wait: 2 });

// Listen for the "install" event, Which Indicates the // Process is available as a service. svc.on ( 'install', function () { svc.start (); });

svc.install ();

mpastrello commented 7 years ago

The service must be installed with http://nssm.cc/download