简体   繁体   English

浏览器外 (oob) 应用程序的自定义安装程序。 更新不起作用

[英]Custom installer for out of browser (oob) application. The update does not work

I want to create a custom installer for oob applications for Windows and MacOS.我想为 Windows 和 MacOS 的 oob 应用程序创建自定义安装程序。

For Windows, I used the following method - https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set对于 Windows,我使用了以下方法 - https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set

For MacOS, the following solution - https://www.blaize.net/2012/04/offline-oob-mac-installation/对于 MacOS,以下解决方案 - https://www.blaize.net/2012/04/offline-oob-mac-installation/

These methods work well and create the application, but the application update does not work with them.这些方法运行良好并创建应用程序,但应用程序更新不适用于它们。

In the Silverlight application, I use the following code to update:在 Silverlight 应用程序中,我使用以下代码进行更新:

private void CheckUpdateApplication()
{
    if (Application.Current.IsRunningOutOfBrowser)
    {
        Application.Current.CheckAndDownloadUpdateAsync();
        Application.Current.CheckAndDownloadUpdateCompleted += Application_CheckAndDownloadUpdateCompleted;
    }
}

private void Application_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e)
{
    if (e.UpdateAvailable)
    {
        MessageBox.Show(CommonMethod.MessageUpdateApplication);
    }
    else if (e.Error != null)
    {
        MessageBox.Show(string.Format("{0} - {1}", e.Error.GetType().Name, e.Error.Message));
    }
}

In the settings of out of browser application, I set the checkbox - "Require elevated trust when running outside the browser".在浏览器外应用程序的设置中,我设置了复选框 - “在浏览器外运行时需要提升信任”。 The XAP file is signed with a self-signed certificate. XAP 文件使用自签名证书进行签名。

After installing in Windows, I get the following error when updating:在Windows中安装后,更新时出现以下错误:

Exception - Error HRESULT E_FAIL has been returned from a call to a COM component.异常 - 调用 COM 组件时返回了错误 HRESULT E_FAIL。

After installing in MacOS, I get the following:在 MacOS 中安装后,我得到以下信息:

OutOfMemoryException - Error 0x1AA6. OutOfMemoryException - 错误 0x1AA6。

Pass the /origin command line argument to sllauncher.exe/origin命令行参数传递给sllauncher.exe

From https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set :https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set

This option specifies the Uri where the XAP file have come from.此选项指定 XAP 文件来自的 Uri。 This Uri is used for security purposes and auto-updates.此 Uri 用于安全目的和自动更新。 For example: /origin: http://mywebsite.com/SampleOOB.xap例如:/origin: http : //mywebsite.com/SampleOOB.xap

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM