啓動VLC我有以下代碼:從asp.net網頁
protected void VLC_Click(object sender, EventArgs e)
{
SecureString password = ConvertStringToSecureString("[password]");
string domain = "";
Process.Start(@"C:\Program Files\VideoLAN\VLC\vlc.exe ", "[username]", password, domain);
}
private SecureString ConvertStringToSecureString(string s)
{
SecureString secString = new SecureString();
foreach (char c in s.ToCharArray())
{
secString.AppendChar(c);
}
return secString;
}
鏈接到一個按鈕上IIS的aspx頁面運行我的Vista機器上。當我點擊瀏覽器中的按鈕時,我可以看到該進程在任務管理器中啓動,但在進程終止後不久,任何時候都不會出現vlc窗口。
有沒有什麼辦法讓按鈕觸發vlc就好像我是在Windows中點擊.exe一樣?
我希望它出現在服務器上。 – Chris 2010-10-12 18:13:49
那麼,你已經管理它。它出現。它在用於執行ASP.NET網站的帳戶下執行,僅此而已。你還期望什麼?可能這個帳戶沒有任何權限也沒有關聯的GUI界面,所以你不能期望在服務器上顯示任何東西。 – 2010-10-12 18:15:52
我希望VLC進程以正常的窗口顯示並且進程保持活動狀態。用戶帳戶是我的正常登錄,當時我登錄到服務器。 – Chris 2010-10-12 18:19:34