Getting full path for Windows Service

后端 未结 7 1087
感情败类
感情败类 2021-01-31 01:22

How can I find out the folder where the windows service .exe file is installed dynamically?

Path.GetFullPath(relativePath);

returns a path base

相关标签:
7条回答
  • 2021-01-31 02:27

    Try this:

    AppDomain.CurrentDomain.BaseDirectory
    

    (Just like here: How to find windows service exe path)

    0 讨论(0)
提交回复
热议问题