I have written in my console application a line System.IO.Path.GetFullPath("ApplicationSubDirectory")
to get application directory file system path.
I build this application and installed exe in my system. exe has been installed in c://ProgramFiles/AppFolder/
directory. When I execute exe then I got valid path like c://ProgramFiles/AppFolder/ApplicationSubDirectory
.
But when i scheduled this exe to run dailly basis in windows scheduler. Then I am getting wrong path. This returns me path of directory where windows scheduler is installed like c://Windows/System32/ApplicationSubDirectory
. This is wrong path.
Please help me how i get valid path after scheduling exe too.
Thanks a lot.