WebJun 2, 2009 · It seems NET6 didn't like this. After using one of the examples below, I noticed IntelliSense suggested this: Environment.ProcessPath. Thus, to get the path to the application exe: Environment.ProcessPath. To get the folder: Path.GetDirectoryName (Environment.ProcessPath) Hope this helps. Share. Improve this answer. WebMay 26, 2009 · How can i find the execution path of a installed software in c# for eg media player ,vlc player . i just need to find their execution path . if i have a vlc player installed in my D drive . how do i find the path of the VLC.exe from my c# coding
c# - How to get installation path of an application? - Stack Overflow
WebSpecialFolder.ApplicationData: C:\Documents and Settings\blake\Application Data SpecialFolder.CommonApplicationData: C:\Documents and Settings\All Users\Application Data SpecialFolder.ProgramFiles: C:\Program Files SpecialFolder.CommonProgramFiles: C:\Program Files\Common Files SpecialFolder.DesktopDirectory: C:\Documents and … WebNov 1, 2024 · In this article, we will discuss how to get the full path of the current directory. So to solve this problem we use the CurrentDirectory property of the Environment Class. … offshore power catamaran racing
How to get current working directory path c#? - Stack Overflow
WebSep 4, 2011 · C# string exePath = System.IO.Path.GetDirectoryName ( System.Reflection.Assembly.GetEntryAssembly ().Location); Other methods either require a library which you don't use (such as System.Windows.Forms) or depends on how the code is hosted (for example, using parameters of Main is not reliable). —SA Posted 4-Sep-11 … WebAug 11, 2011 · If you want to know the location of the build output directory use Assembly.CodeBase, i.e.: Path.GetDirectoryName (new Uri (Assembly.GetExecutingAssembly ().CodeBase).LocalPath) Useful if you want to access other resources from the directory of the assembly for example when running test suite. … WebJul 24, 2010 · I tried the below as well with same results: string path = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().CodeBase); XDocument.Load (Path.Combine (path, cfgFile)); EDIT 1 The problem is the following. My solutions base directory is "C:\Project", all compiled files are copied to "C:\Project\build". my family roots