Thanks, this isn't working for me? I did the parts:
The recommended way to install node-windows is with npm, using the global flag:
npm install -g node-windows
Then, in your project root, run:
npm link node-windows
Then ran the .vbs file with the code in it (with my edits and as it is to make sure typo's etc):
var Service = require('node-windows').Service;
// Create a new service object
var svc = new Service({
name:'Hello World',
description: 'The nodejs.org example web server.',
script: 'C:\\path\\to\\helloworld.js'
});
// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install',function(){
svc.start();
});
svc.install();
My Edits:
var Service = require('node-windows').Service;
// Create a new service object
var svc = new Service({
name:'WikiMedia Parsoid Service',
description: 'The nodejs.org example web server.',
script: 'C:\\node_modules\\parsoid\\bin\\server.js'
});
// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install',function(){
svc.start();
});
svc.install();
But I get the error each time:
---------------------------
Windows Script Host
---------------------------
Script: C:\Users\alacey\Desktop\TEST.vbs
Line: 1
Char: 23
Error: Syntax error
Code: 800A03EA
Source: Microsoft VBScript compilation error
---------------------------
OK
---------------------------
Am I missing something obvious here?
Kind regards
Adam