Ana sayfaya git Mail gönder Abone ol

İpucu: .NET ile yazdığınız Windows servisinin çalıştığı dizini bulun

Bir Windows Forms uygulamasında Application.StartupPath ile eriştiğimiz çalışma dizinine Windows servisi şartları altında (System.Windows.Forms.Application sınıfına ulaşamadığımız bir durumda) şu şekilde erişebiliriz:

System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)

Yorumunu ekle