13 lines
492 B
JavaScript
13 lines
492 B
JavaScript
/* eslint-disable unicorn/filename-case, @eslint-community/eslint-comments/disable-enable-pair */
|
|
import { Service } from 'node-windows';
|
|
import { serviceConfig } from './windowsService.js';
|
|
// Create a new service object
|
|
const svc = new Service(serviceConfig);
|
|
// 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();
|