我开发了一个电子应用程序,并使用eletron-packager和electron-squirrel-startup创建了.exe和.msi安装程序文件。.exe文件工作正常,但.msi不工作。它看起来只是在某个时候停下来,然后关闭。在控制面板中,我可以看到“my_app机器范围的安装程序”,我不确定这是否是想要的效果,但尽管如此,my_app并没有安装。
我有一个非常基本的handleSquirrelEvents函数:
switch (squirrelEvent) {
case '--squirrel-install':
case '--squirrel-updated':
// Optionally do things such as:
// - Add your .exe to the PATH
// - Write to the registry for things like file associations and
// explorer context menus
// Install desktop and start menu shortcuts
spawnUpdate(['--createShortcut', exeName]);
setTimeout(application.quit, 1000);
return true;
case '--squirrel-uninstall':
// Undo anything you did in the --squirrel-install and
// --squirrel-updated handlers
// Remove desktop and start menu shortcuts
spawnUpdate(['--removeShortcut', exeName]);
setTimeout(application.quit, 1000);
return true;
case '--squirrel-obsolete':
// This is called on the outgoing version of your app before
// we update to the new version - it's the opposite of
// --squirrel-updated
application.quit();
return true;
}这有点牵强,但也许与数字签名有关?
发布于 2017-09-18 10:01:18
我发现了这个:https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/using/machine-wide-installs.md
上面写着:
计算机范围内安装松鼠的Releasify命令生成适合通过组策略安装的MSI文件。这个MSI不是一个通用的安装程序,这意味着一旦你运行MSI,用户从现在起将安装应用程序,在下一个登录。 因此,大多数普通用户应该继续运行Releasify生成的Setup.exe,但是如果您想拥有一个IT管理友好版本,则可以放弃MSI 松鼠的大多数用户不必做任何新的事情来启用这种行为,尽管某些NuGet包ID/名称可能会导致MSI出现问题。
看起来我的.msi运行得很好,只是我期望得到不同的结果。
发布于 2017-09-15 12:47:27
这只是第一个建议--这不是一个真正的答案。当我们获得更多信息时,我将进行更新:如果安装了Windows,您可以搜索Orca-x86_en-us.msi。安装此MSI,您将访问"Orca“-一个MSI文件查看器。在Orca中打开MSI,并通过工具->验证运行验证。单击Go (并可能取消勾选信息消息的勾选框)。在“开始”菜单中应该添加到Orca的快捷方式。请用任何错误信息更新您的答案。
https://stackoverflow.com/questions/46235950
复制相似问题