yunkong2
Version:
automate your life - platfom
18 lines (14 loc) • 458 B
JavaScript
;
const Service = require('node-windows').Service;
// Create a new service object
const svc = new Service({
name: 'yunkong2',
script: require('path').join(__dirname, 'controller.js')
});
// Listen for the "uninstall" event so we know when it's done.
svc.on('uninstall', () => {
console.log('Uninstall complete.');
console.log('The service exists: ', svc.exists);
});
// Uninstall the service.
svc.uninstall();