How to get installation path of an application?

后端 未结 6 1506
轻奢々
轻奢々 2020-12-06 05:54

In Windows using C#, how can I get the installation path of a software (for example consider NUnit or any other software like MS word, etc.) from my project

6条回答
  •  一整个雨季
    2020-12-06 06:17

    Application.ExecutablePath (includes filename)
    Application.StartupPath (not includes filename)
    

    This will give you the path where the application started. Hopefully it will be the installation path.

提交回复
热议问题