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.
C# と WindowsForms を使用して、保存/開く/キャンセルするように求められることなく、IE で HTA ファイルを開く方法はありますか? プロンプトが表示された状態で、これを行う方法は次のとおりです。
Process.Start("iexplore", Path.Combine(Application.StartupPath, "file.hta"));
ありがとうございました!
HTA はブラウザー (iexplore.exe) ではなく、explorer.exe によって実行されるため、次のように試すことができます。
Process.Start("explorer.exe", Path.Combine(Application.StartupPath, "file.hta"));
また:
Process.Start("mshta.exe", Path.Combine(Application.StartupPath, "file.hta"));