要注意,不能用Environment.CurrentDirectory,而需要用AppDomain.CurrentDomain.BaseDirectory

.NET : 如何在Windows Service中获取到当前工作目录

相关文章: