简体   繁体   English

如何静默自动更新通过 NSIS 为所有用户/每台机器安装的 electron 应用程序?

[英]How to silently auto-update an electron application that is installed via NSIS for all users / per-machine?

Project: We have created an electron application that is shipped to our users (mostly using Windows) using an NSIS installer built with electron-builder.项目:我们创建了一个 electron 应用程序,该应用程序使用由 electron-builder 构建的 NSIS 安装程序发送给我们的用户(主要使用 Windows)。

Scenario: Our users are companies who install our application into the "C:\Program Files" folder on a Windows Terminal Server for all of their staff.场景:我们的用户是将我们的应用程序安装到其所有员工的 Windows 终端服务器上的“C:\Program Files”文件夹中的公司。 The staff - who is using our software and sees the related update notification after a new release - most of the times can not install the update because of a lack of necessary permissions.工作人员 - 正在使用我们的软件并在新版本发布后看到相关的更新通知 - 大多数时候由于缺乏必要的权限而无法安装更新。

Question: We would like to not only solve the above problem but even go one step further: We would like our app to update itself silently.问:我们不仅想解决上述问题,甚至 go 更进一步:我们希望我们的应用程序能够静默更新。 What possible solutions are there to make this possible in a scenario like the above?在上述情况下,有哪些可能的解决方案可以使这成为可能?

If you do per-user installs instead then normal users will of course be able to write to the directory.如果您改为按用户安装,那么普通用户当然可以写入目录。

Another option is to switch to MSI.另一种选择是切换到 MSI。 A signed MSI package can be patched by normal users without UAC elevation.普通用户无需 UAC 提升即可修补已签名的 MSI package。 This is called User Account Control (UAC) Patching .这称为用户帐户控制 (UAC) 补丁

A third option is to create a NT service that runs the installer.第三种选择是创建运行安装程序的 NT 服务。 Services can be configured so that normal users can start them.可以配置服务,以便普通用户可以启动它们。 A scheduled task might also work.计划任务也可能起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM