2012-04-12 4 views
0

Gibt es eine Möglichkeit, ich konnte eine HTA-Datei im IE öffnen, ohne aufgefordert, zu speichern/öffnen/abbrechen mit C# und WindowsForms? Hier ist, wie ich es tun, mit der Aufforderung zeigt sich:Öffnen HTA-Datei in IE ohne Save/Open/Cancel Prompt in C#

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

Vielen Dank!

Antwort

1

HTAs werden von explorer.exe, nicht durch Browser (iexplore.exe) laufen, so können Sie dies versuchen:

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

oder:

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