以编程方式启动Silverlight Out of Browser App

以编程方式启动Silverlight Out of Browser App,第1张

概述我正在尝试使用SLLAUNCHER.EXE来启动已安装的SL Out-of-Browser应用程序.运行以下内容后,桌面上的MyApp启动图标就会消失.如果我尝试没有覆盖开关没有任何反应. 我正在使用这篇文章作为指南: http://timheuer.com/blog/archive/2010/03/25/using-sllauncher-for-silent-install-silverligh 我正在尝试使用sllAUNCHER.EXE来启动已安装的SL Out-of-browser应用程序.运行以下内容后,桌面上的MyApp启动图标就会消失.如果我尝试没有覆盖开关没有任何反应.

我正在使用这篇文章作为指南:

http://timheuer.com/blog/archive/2010/03/25/using-sllauncher-for-silent-install-silverlight-application.aspx

任何建议,将不胜感激.

static voID Main(string[] args)    {        string sllauncherPath = string.Format("{0}\Microsoft Silverlight\sllauncher.exe",Environment.GetFolderPath(Environment.SpecialFolder.Programfiles));        string originUri = @"http://localhost:52878/ClIEntBin/MyApp.xap";        string xap = "MyApp.xap";        string arg = string.Format(@"/emulate:""{0}"" /origin:""{1}""  /overwrite",xap,originUri);        var startInfo = new processstartinfo        {            CreateNowindow = false,UseShellExecute = false,RedirectStandardOutput = false,filename = sllauncherPath,Arguments = arg        };       var process = Process.Start(startInfo))    }
解决方法 你使用64位机器吗?
http://social.msdn.microsoft.com/Forums/en-US/silverlightcontrols/thread/abedb9dc-d471-4d82-8a20-45f98671cac9

还可以帮助:
这是我在检测到更新完成后从我的SL OOB应用程序中重新启动的方式

''put this in your App.xaml.vb[.cs] and call DoRestartPublic Shared Sub DoRestart()    StartAgain()    Application.Current.MainWindow.Close()End SubPublic Shared Sub StartAgain()    If Not [String].IsNullOrEmpty(GetsllauncherCommand) Then        Using shell = automationFactory.CreateObject("WScript.Shell")            shell.Run(GetsllauncherCommand)        End Using    End IfEnd SubPublic Shared Function GetsllauncherCommand() As String    Dim desktopPath As String    Dim sllauncherCommand As String = ""    Using wShell As Object = automationFactory.CreateObject("WScript.Shell")        desktopPath = wShell.SpecialFolders("Desktop")    End Using    Using shell As Object = automationFactory.CreateObject("Shell.Application")        Dim DesktopFolder As Object = shell.[nameSpace](desktopPath)        Dim DesktopItems As Object = DesktopFolder.Items()        For Each item In DesktopItems            If item.Islink Then 'this is a shurtcut                Dim filename As String = item.name.Tolower()                If filename.Contains("!!!<PART OF YOUR SL APPS SHORCUT name>!!!!") Then                    Dim link = item.Getlink()                    sllauncherCommand = """" & Convert.ToString(link.Path) & """ " & Convert.ToString(link.Arguments)                End If            End If        Next    End Using    Return sllauncherCommandEnd Function

您可以尝试调整非SL应用程序的代码!

THT

总结

以上是内存溢出为你收集整理的以编程方式启动Silverlight Out of Browser App全部内容,希望文章能够帮你解决以编程方式启动Silverlight Out of Browser App所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1002077.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存