Home > Code > General > Get current working directory or Startup path of Windows Service application using C#

Get current working directory or Startup path of Windows Service application using C#

by Thamil   on Jun 08, 2011   Category: General   |  Views: 7608    |  Points: 25   |  Gold 


It’s not an usual way to get/configure files in windows service application.By using the below code we can access the necessary xml or related files in executable path from our windows service application.

 string BaseDir1 = AppDomain.CurrentDomain.BaseDirectory; 
string BaseDir2 = Path.GetDirectoryName(Application.ExecutablePath);





Post Code  |  Code Snippet Home

Recent Posts

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts