2012-04-12 47 views
0

有沒有一種方法,我可以在IE中打開一個HTA文件,而不會被提示保存/打開/取消使用C#和WindowsForms? 這裏是我如何做到這一點,與提示顯示出來:HTA文件,但不保存/打開/取消提示在C#

Process.Start("iexplore", Path.Combine(Application.StartupPath, "file.hta")); 

謝謝!

回答

1

衛生技術評估是由explorer.exe的運行,而不是通過瀏覽器(iexplore.exe的),所以你可以試試這個:

Process.Start("explorer.exe", Path.Combine(Application.StartupPath, "file.hta")); 

或:

Process.Start("mshta.exe", Path.Combine(Application.StartupPath, "file.hta"));