hi there
is there a way to get the the path of the working directory where the vb.net program is run, as a string?
thanking you.
Printable View
hi there
is there a way to get the the path of the working directory where the vb.net program is run, as a string?
thanking you.
what do you mean by "working directory"?
The working directory and the directory where the program was run from are not necessarily the same thing. You get the path of the folder containing the current app's executable using Application.StartupPath and the path of the executable itself using Application.ExecutablePath. Neither of those properties will change over the course of a session. The working directory is found using Environment.CurrentDirectory. It may be changed, either explicitly by your code, by the user when using a FileDialog or various other means.