首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >电子Squirrel.Windows:.msi不工作

电子Squirrel.Windows:.msi不工作
EN

Stack Overflow用户
提问于 2017-09-15 09:12:59
回答 2查看 2.2K关注 0票数 3

我开发了一个电子应用程序,并使用eletron-packagerelectron-squirrel-startup创建了.exe.msi安装程序文件。.exe文件工作正常,但.msi不工作。它看起来只是在某个时候停下来,然后关闭。在控制面板中,我可以看到“my_app机器范围的安装程序”,我不确定这是否是想要的效果,但尽管如此,my_app并没有安装。

我有一个非常基本的handleSquirrelEvents函数:

代码语言:javascript
复制
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;
}

这有点牵强,但也许与数字签名有关?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 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运行得很好,只是我期望得到不同的结果。

票数 1
EN

Stack Overflow用户

发布于 2017-09-15 12:47:27

这只是第一个建议--这不是一个真正的答案。当我们获得更多信息时,我将进行更新:如果安装了Windows,您可以搜索Orca-x86_en-us.msi。安装此MSI,您将访问"Orca“-一个MSI文件查看器。在Orca中打开MSI,并通过工具->验证运行验证。单击Go (并可能取消勾选信息消息的勾选框)。在“开始”菜单中应该添加到Orca的快捷方式。请用任何错误信息更新您的答案。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46235950

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档