Getting full path for Windows Service

Posted by Samuel Kim on Stack Overflow See other posts from Stack Overflow or by Samuel Kim
Published on 2008-10-14T03:49:22Z Indexed on 2010/06/11 21:03 UTC
Read the original article Hit count: 180

Filed under:
|
|

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

Path.GetFullPath(relativePath);

returns a path based on C:\WINDOWS\system32 directory.

However, the XmlDocument.Load(string filename) method appears to be working against relative path inside the directory where the service .exe file is installed to.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET