7
我試圖使用SLLAUNCHER.EXE啓動已安裝的SL瀏覽器外應用程序。運行以下代碼後,桌面上的MyApp啓動圖標就消失了。如果我嘗試沒有覆蓋開關沒有任何反應。以編程方式啓動Silverlight退出瀏覽器應用程序
我使用這篇文章作爲指導:
任何建議,將不勝感激。
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))
}
它工作還是有問題嗎? – kenny
我試圖讓同樣的事情工作。看起來Silverlight 4中可能存在一個錯誤,導致sllauncher.exe無提示失敗。無論如何,我會繼續研究它。也許有一個解決方法。 https://connect.microsoft.com/VisualStudio/feedback/details/575052/sllauncher-exe-fails-silently-and-runs-nothing-with-emulate-option –
我試圖用我的應用程序完全相同的代碼在希望我可以簡單地使用外部應用程序以編程方式啓動安裝在同一個盒子上的OOB silverlight應用程序,並獲得相同的結果。我的OOB應用程序的桌面快捷方式消失了,OOB silverlight的窗口顯示出來了。我在我的託管版本中傳遞了init參數,導致它不會加載OOB,所以我不是100%,它的加載還沒有像預期的那麼好,但是窗口在窗口標題欄中彈出預期的標題。 –