如何找到窗口服务exe文件路径 [英] How to find windows service exe path

查看:156
本文介绍了如何找到窗口服务exe文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个窗口服务,我需要创建目录存放一些信息。该目录路径必须是相对于窗口服务exe文件。
怎样才能得到这个exe文件路径

I have a windows service and I need to create directory to store some info. The directory path must be relative to the windows service exe file. How can get this exe file path ?

推荐答案

您可以使用的 AppDomain.CurrentDomain.BaseDirectory

这篇关于如何找到窗口服务exe文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆