I have a console app in c# thats starts on schuled times by the Windows task scheduler.
The app needs some physical files from its own directory and uses System.IO.Directory.GetCurrentDirectory()
for that.
Normal when I start the console app myself, it works perfectly. But when it is started by Windows Task Scheduler, it returns C:\Windows\System32
.
Why is this not the application directory and is there another way how I can get the application directory?