How can I get the absolute path of program I'm running?
For that you can use the Application object.
Startup path, just the folder, use Application.StartupPath()
Dim appPath As String = Application.StartupPath()
Full .exe path, including the program.exe name on the end:, use Application.ExecutablePath()
Dim exePath As String = Application.ExecutablePath()
For a console application you can use System.Reflection.Assembly.GetExecutingAssembly().Location as long as the call is made within the code of the console app itself, if you call this from within another dll or plugin this will return the location of that DLL and not the executable.
If the path is a drive, a slash will also appear in the path, and this time the use will cause problems. To unify, the best solution is the following command.
Dim FileName As String = "MyFileName"
Dim MyPath1 As String = Application.StartupPath().TrimEnd("\") & "\" & FileName
Dim MyPath2 As String = My.Application.Info.DirectoryPath.TrimEnd("\") & "\" & FileName