为使用Electron创建的应用程序签名Windows安装程序(.exe)

编程入门 行业动态 更新时间:2024-10-23 11:21:18
本文介绍了为使用Electron创建的应用程序签名Windows安装程序(.exe)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个使用 Electron框架构建的简单应用。我使用 electron-packager-interactive 打包了代码。我还创建了一个 Windows安装程序文件,该文件可使用Inno Setup编译器分发(单个.exe文件)。

这里的问题是,当用户运行.exe文件时, Windows Smart屏幕上的弹出窗口阻止了该文件,表明发布者为未知。只有在更多信息之后,它才能使用 仍然运行进行安装。可能是因为我的应用程序未签名。那么有人可以帮助我如何对电子应用程序(Windows应用程序)进行签名,以便将其视为受信任的应用程序吗?

谢谢

解决方案

首先必须对安装程序进行签名。

为此,请设置Inno设置 SignTool 指令 。请参阅指令文档。

尽管一旦您拥有证书和所有东西,也要在(电子)应用程序本身上签名。 / p>

Inno Setup编译器可以为您完成此操作。打包前不必亲自对.exe进行手动签名。

只需设置 符号 (或 无知 )标志位于 [文件] 部分。

来源: MyProg.exe; DestDir: {app};标志:标志

I have a simple app built using Electron framework. I packaged the code using electron-packager-interactive. I also created a Windows installer file which is ready for distribution using Inno Setup compiler (Single .exe file).

The problem here is when users run the .exe file, a popup from Windows Smart screen blocks it saying publisher is unknown. Only after "More info", it allows to install with "Run anyway". Probably it's because my application is not signed. So can anyone help me how to sign an Electron application (Windows application) so that it's treated as trusted application?

Thanks

解决方案

You primarily have to sign the installer.

For that, set the Inno Setup SignTool directive. See the directive documentation.

Though once you have a certificate and everything, sign the (electron) application itself too.

Inno Setup compiler can do this for you. You do not have to manually sign the .exe yourself before packaging.

Just set the sign (or signonce) flag in the [Files] section entry for the .exe:

Source: "MyProg.exe"; DestDir: "{app}"; Flags: sign

更多推荐

为使用Electron创建的应用程序签名Windows安装程序(.exe)

本文发布于:2023-11-02 17:38:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1553000.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:安装程序   应用程序   Electron   exe   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!