原文链接:
https://newsn.net/say/electron-builder-execution-level.html
1、
打开项目,找到package.json文件
2、
修改权限,修改的节点位置为:build>win>requestedExecutionLevel
requestedExecutionLevel选项有三种可选
requestedExecutionLevel选项
我们要获取管理员权限,所以将requestedExecutionLevel设为highestAvailable或requireAdministrator皆可,我设置的是highestAvailable,如下图
配置项修改
3、
重新编译,npm run build => 安装 =>就可以看到可爱的盾牌标志了