我正在使用这篇文章作为指南:
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所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)