C# ile bilgisayarda oluşturulmuş “.bat” uzantılı dosyaları çalıştırmak için örnek uygulamaya ait kodlar.
Örneğimizde Usb bellekte bulunan gizli klasörleri görünür hale getirmek için hazırlanmış “goster.bat” dosyası çalıştırılmakta.
1 2 3 4 5 6 7 8 9 10 | static void Main(string[] args) { System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo(@"d:\goster.bat"); System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo = p; proc.Start(); proc.WaitForExit(); } |
Teşekkürler çok işime yaradı, güzel bilgi.
Teşekkürler işime yaradı