Installation path of deployment app

  • Thread starter Grumpy Aero Guy
  • Start date
G

Grumpy Aero Guy

I have a project with a deployment project.

All works GREAT !!!

Is there a system variable (maybe via the dot net framework I'm assuming)
that stores the installation path of the app, assuming the end-user changes
the default path that I set up in the deployment project?

Thank you in advance!
 
B

Bob Powell [MVP]

For many things you can use [TARGET] as a path to the installation
directory. What are you trying to do?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
H

Herfried K. Wagner [MVP]

Grumpy Aero Guy said:
I have a project with a deployment project.

All works GREAT !!!

Is there a system variable (maybe via the dot net framework I'm assuming)
that stores the installation path of the app, assuming the end-user
changes the default path that I set up in the deployment project?

Either add a reference to "System.Windows.Forms.dll" and import the
'System.Windows.Forms' namespace in order to use 'Application.StartupPath'
or use the code below:

\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetEntryAssembly().Location)
End Function
///
 
G

Grumpy Aero Guy

Fantastic.... just what i needed.

I have a few link lables here and there that do a process.start on some
reference files (pdf) in the main app folder.

Just wanted to give the app a way to find them, as long as they're in the
install directory --- either the default, or wherever the user installed the
thing.

THANKS TO ALL. Now I at least know where to start looking
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top