0

I have a simple app, which I want to install using click once deployment. I want to retrieve the path where the user installed the app for ex. check the following image:-

enter image description here

I want to retrieve the path which is entered by the user. Is it possible to retrieve that path? If it's possible please suggest a suitable method. The app is made in C#

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Pratik Singhal
  • 6,283
  • 10
  • 55
  • 97
  • This may help: http://stackoverflow.com/questions/881251/how-to-get-the-path-of-appwithout-app-exe – Mark Redman Nov 02 '13 at 12:37
  • possible duplicate of [How to get folder path for ClickOnce application](http://stackoverflow.com/questions/2359026/how-to-get-folder-path-for-clickonce-application) – Hans Passant Nov 02 '13 at 13:51

1 Answers1

1

It is possible to get the path the application is running from.

Just use:

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

this will give you the path of the Application.

If you want just the folder, you can use

 AppDomain.CurrentDomain.BaseDirectory
therealtbs
  • 162
  • 10