2011-08-23 3 views
7

SLLAUNCHER.EXE를 사용하여 설치된 SL Out-of-Browser App을 시작하려고합니다. 바탕 화면의 MyApp 시작 아이콘은 아래를 실행하면 사라집니다. 덮어 쓰기 스위치없이 시도하면 아무 일도 일어나지 않습니다.브라우저에서 Silverlight를 시작하십시오. 프로그램 응용 프로그램

나는 가이드로이 문서를 사용하고 있습니다 :

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)) 

    } 
+1

문제가 있습니까? – kenny

+0

나는 똑같은 일을하려고 노력하고있다. Silverlight 4에 버그가있어 sllauncher.exe가 자동으로 실패하는 것으로 보입니다. 어쨌든, 나는 계속 그것에 대해 조사 할 것입니다. 아마도 해결 방법이 있습니다. https://connect.microsoft.com/VisualStudio/feedback/details/575052/sllauncher-exe-fails-silently-and-runs-nothing-with-emulate-option –

+0

희망에 내 앱과 똑같은 코드를 시도했습니다. 외부 응용 프로그램을 사용하여 프로그래밍 방식으로 동일한 상자에 설치된 OOB Silverlight 응용 프로그램을 시작하고 동일한 결과를 얻었을뿐입니다. 내 OOB 앱에 대한 내 바탕 화면 바로 가기가 사라지고 OOB 실버 라이트에 대한 창이 표시되었습니다. OOB을로드하지 않도록하는 호스트 된 버전에서 init params를 전달합니다. 그래서 기대했던대로 100 %로드하지는 않지만 윈도우 제목 표시 줄에 예상 제목이 팝업됩니다. –

답변

0

64 비트 시스템을 사용하고 있습니까? http://social.msdn.microsoft.com/Forums/en-US/silverlightcontrols/thread/abedb9dc-d471-4d82-8a20-45f98671cac9

수 allso가 도움이 내가 업데이트가 완료 감지 한 후 내 SL의 OOB 응용 프로그램 내에서 다시 시작 어떻게입니다 :

''put this in your App.xaml.vb[.cs] and call DoRestart 
Public Shared Sub DoRestart() 
    StartAgain() 
    Application.Current.MainWindow.Close() 
End Sub 
Public Shared Sub StartAgain() 
    If Not [String].IsNullOrEmpty(GetSLLauncherCommand) Then 
     Using shell = AutomationFactory.CreateObject("WScript.Shell") 
      shell.Run(GetSLLauncherCommand) 
     End Using 
    End If 
End Sub 
Public 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 SLLauncherCommand 
End Function 

당신이 당신의 비 SL에 대한 코드를 적용 시도 할 수 앱!

THT

관련 문제