2009-02-02 13 views

Antwort

6

Das durchaus möglich, zum Beispiel ist:

System.Diagnostics.Process.Start(@"C:\listfiles.bat"); 
3

prüfen dieses Beispiel von C# Station

using System; 
using System.Diagnostics; 

namespace csharp_station.howto 
{ 
    /// <summary> 
    /// Demonstrates how to start another program from C# 
    /// </summary> 
    class ProcessStart 
    { 
     static void Main(string[] args) 
     { 
      Process notePad = new Process(); 

      notePad.StartInfo.FileName = "notepad.exe"; 
      notePad.StartInfo.Arguments = "ProcessStart.cs"; 

      notePad.Start(); 
     } 
    } 
} 
2

Sie auch dies tun können:

System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(); 
    info.UseShellExecute = true; 
    info.FileName = "iisreset"; 
    System.Diagnostics.Process.Start(info); 



    Console.ReadLine(); 
Verwandte Themen