How to get installation path of an application?

后端 未结 6 1505
轻奢々
轻奢々 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:31

    Use the system and application classes. This will give you all sorts of information.

    EG: Application.ExecutablePath

    It also provides methods to do what you want to.

    Edit: Also see registry read/write instructions here:

    http://www.c-sharpcorner.com/UploadFile/sushmita_kumari/RegistryKeys102082006061720AM/RegistryKeys1.aspx?ArticleID=0ce07333-c9ab-4a6a-bc5d-44ea2523e232

提交回复
热议问题