Signing a Windows installer (.exe) for application created using Electron

回眸只為那壹抹淺笑 提交于 2019-12-07 13:04:58

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/44105788/signing-a-windows-installer-exe-for-application-created-using-electron

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!