小编kam*_*ran的帖子

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

我正在尝试使用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))

    }
Run Code Online (Sandbox Code Playgroud)

silverlight

7
推荐指数
1
解决办法
1720
查看次数

标签 统计

silverlight ×1