问题
After making a basic CPU Monitor app (https://drive.google.com/drive/folders/1f5yGQc4LFGj2baEjyHl5TT_LD5kM09uZ?usp=sharing) which sends notification when the cpu utilization goes over a certain percentage, I packaged the project. But the notification states that the app creating the notification is electron.app.CPU Monitor
in place of CPU Monitor
. How to exclude the unnecessary electron.app
part?
回答1:
This appears to have been answered recently: how can you overwrite or remove the signature “electron.app.Electron” from the desktop notification
On Windows, it seems that app.setAppUserModelId() must be called beforehand:
if (process.platform === 'win32')
{
app.setAppUserModelId(app.name)
}
来源:https://stackoverflow.com/questions/64237127/electron-app-notification-states-the-app-sending-notification-is-electron-app-a