How to get Where my Exe is installed

  • Thread starter Thread starter fireInWinter
  • Start date Start date
F

fireInWinter

Hi,My program has a xml config file ,I put it along with my exe file ,and
how can I get the path so that I can use XmlReader to get config infomation.

and now I use Application.StartupPath.ToString();

but it seems not always OK.
 
fireInWinter said:
Hi,My program has a xml config file ,I put it along with my exe file
,and how can I get the path so that I can use XmlReader to get config
infomation.

and now I use Application.StartupPath.ToString();

System.Reflection.Assembly.GetExecutingAssembly().Location;

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 
Back
Top