Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法我可以在 IE 中打开 HTA 文件而不会提示使用 C# 和 WindowsForms 保存/打开/取消?我是这样做的,提示出现:
Process.Start("iexplore", Path.Combine(Application.StartupPath, "file.hta"));
谢谢!
HTA 由 explorer.exe 运行,而不是由浏览器 (iexplore.exe) 运行,因此您可以尝试以下操作:
Process.Start("explorer.exe", Path.Combine(Application.StartupPath, "file.hta"));
或者:
Process.Start("mshta.exe", Path.Combine(Application.StartupPath, "file.hta"));