Electron App 安装到 ProgramFiles

Electron App Installation to ProgramFiles

制作 Electron 应用程序安装程序以便将其安装在 ProgramFiles 中的最佳方法是什么?我正在使用 electron-builder,但它会在 %appdata%

中安装应用程序

如果您在 package.json 中将 build/nsis/perMachine 设置为 false(默认设置),则安装程序确实会安装在 %appdata% 中。如果将 perMachine 设置为 true,程序将安装在程序文件中,此外,如果将 oneClick 设置为 false,则允许用户选择安装位置。