TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Member1
NA
169
51.3k
How to get path of .ini file while run in windows service?
Oct 19 2015 8:10 AM
I have a small doubt. I want to get my configue file path from folder where i install my project it may be any drive path. currently i give path hardcoded in program but at time of installation in different system it would give error.
I tried following ,
string f = Path.Combine(Directory.GetCurrentDirectory(), "hr.ini");
but after installing service it returns path like below,
"C:\Windows\system32\hr.ini. "
but i want its actual path where this file is present which is "C:\ProgramFiles\SetupProject\hr.ini".
so please suggest me any examples.
thanks
Reply
Answers (
1
)
how to insert multiple windows data by single click event
Read a dynamically content from page in c#