为使用 Electron 创建的应用程序签署 Windows 安装程序 (.exe) [英] Signing a Windows installer (.exe) for application created using Electron

查看:33
本文介绍了为使用 Electron 创建的应用程序签署 Windows 安装程序 (.exe)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆