Electron Squirrel.Windows: .msi 不工作
Electron Squirrel.Windows: .msi not working
我开发了一个 Electron 应用程序并使用 eletron-packager
然后 electron-squirrel-startup
我创建了 .exe
和 .msi
安装程序文件。 .exe
文件工作正常,但 .msi
不是。看起来它只是在某个时刻停止并关闭。在控制面板中我可以看到“my_app Machine-Wide Installer”,我不确定这是否是我想要的效果,但是 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;
}
有点牵强,但可能跟数字签名有关?
只是第一个建议 - 这不是真正的答案。当我们获得更多信息时,我会更新:如果您安装了 Windows SDK,您可以搜索 Orca-x86_en-us.msi
。安装此 MSI,您将可以访问 "Orca" - MSI 文件查看器。在 Orca 中打开您的 MSI,然后通过工具 -> 验证 运行 验证。单击 Go(也许取消选中 INFO 消息的复选框)。应该有一个 Orca 的快捷方式添加到您的开始菜单中。请使用任何错误消息更新您的答案。
我发现了这个:https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/using/machine-wide-installs.md
它说:
Machine-wide Installs Squirrel's Releasify command generates an MSI
file suitable for installation via Group Policy. This MSI isn't a
general-purpose installer, this means that once you run the MSI, users
from now on will get the app installed, on next Login.
So, most normal users should continue to run the Setup.exe's generated
by Releasify, but if you want to have an IT Admin Friendly version,
you can hand off the MSI
Most users of Squirrel won't have to do anything new to enable this
behavior, though certain NuGet package IDs / names might cause
problems with MSI.
看起来我的 .msi
工作正常,只是我期望得到不同的结果。
我开发了一个 Electron 应用程序并使用 eletron-packager
然后 electron-squirrel-startup
我创建了 .exe
和 .msi
安装程序文件。 .exe
文件工作正常,但 .msi
不是。看起来它只是在某个时刻停止并关闭。在控制面板中我可以看到“my_app Machine-Wide Installer”,我不确定这是否是我想要的效果,但是 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;
}
有点牵强,但可能跟数字签名有关?
只是第一个建议 - 这不是真正的答案。当我们获得更多信息时,我会更新:如果您安装了 Windows SDK,您可以搜索 Orca-x86_en-us.msi
。安装此 MSI,您将可以访问 "Orca" - MSI 文件查看器。在 Orca 中打开您的 MSI,然后通过工具 -> 验证 运行 验证。单击 Go(也许取消选中 INFO 消息的复选框)。应该有一个 Orca 的快捷方式添加到您的开始菜单中。请使用任何错误消息更新您的答案。
我发现了这个:https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/using/machine-wide-installs.md
它说:
Machine-wide Installs Squirrel's Releasify command generates an MSI file suitable for installation via Group Policy. This MSI isn't a general-purpose installer, this means that once you run the MSI, users from now on will get the app installed, on next Login.
So, most normal users should continue to run the Setup.exe's generated by Releasify, but if you want to have an IT Admin Friendly version, you can hand off the MSI
Most users of Squirrel won't have to do anything new to enable this behavior, though certain NuGet package IDs / names might cause problems with MSI.
看起来我的 .msi
工作正常,只是我期望得到不同的结果。