【发布时间】:2019-02-03 12:57:06
【问题描述】:
我可以使用 node-notifier 从电子发送 Windows 通知
notifier.notify({
appName: "myapp",
title: 'My notification',
message: 'Hello, there!'
});
我可以使用 node-windows 从电子运行服务
来自我的主进程
var svc = new Service({
name: 'MyService',
description: '',
script: 'MyService.js',
});
svc.on('install', function () {
console.log('Install complete.');
svc.start();
});
svc.install();
但是当我尝试从由电子创建的服务发送通知时,并没有出现。虽然我检查了服务内的代码在日志中运行时没有任何错误!
我知道这在 c# 中是可能的,但我如何在电子中做到这一点?
任何指南如何从服务发送通知?
谢谢
【问题讨论】:
-
我可以使用 node-notifier 从电子发送 Windows 通知 - 你是怎么做到的? 我可以使用 node-windows 从电子运行服务 - 你是怎么做到的? 但是当我尝试从由电子创建的服务发送通知时没有显示。 - 你是怎么做到的?该问题需要stackoverflow.com/help/mcve
-
您使用的是 Windows 10 还是 Windows 8?
-
Windows 10 @Mike
标签: node.js service electron node-windows node-notifier