Click here to Skip to main content
15,924,581 members
Please Sign up or sign in to vote.
4.60/5 (3 votes)
See more:
hi every body

i want know how can i get the path of the folder which the program start from it after install

example
the default directory for any program is :
c:\program files\*****\****

but user may change this path to any another path

my question is how can i get this path

i have tried (Environment.CurrentDirectory);
but it didn`t work
it returned by (My documents path)
any body can help me ??
Posted

1 solution

Application.StartupPath works under most situations.

Environment.CurrentDirectory only gets the current working directory - nothing to do with the application itself.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900