How can I get the installation path during runtime?

  • Thread starter Thread starter Lars Vonderschmitt
  • Start date Start date
L

Lars Vonderschmitt

Hi,

maybe this is a stupid question, but how do I get the path where my apps
is installes into during runtime?

I contribute a txt file to this folder and I need the path to this file
during runtime but I have no clue how to do this.

Thanks for the help.

Lars
 
Usually, Lars, when one finds a solution to a post (even one as simple as
your post was), they post the solution for others' benefit.

Tim
 
Tim said:
Usually, Lars, when one finds a solution to a post (even one as simple as
your post was), they post the solution for others' benefit.

Sorry, here you go:

System.IO.Path.GetDirectoryName _
(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)

By the way. Does none of you know how to quote? You are all posting a
lot of tofu.
http://www.netmeister.org/news/learn2quote.html

Nothing against you all, but it is really hard to read the postings. The
right quoting would make it much easier.

Lars
 
What do you mean by "quoting"? Your reply looks identical to Tim's (which
looks just like this one). Both have the original post line prefixed with a
">" character. This has been a newsgroup standard since before HTML
existed. If you don't see these messages that way then I'd say it's your
reader's problem, not the poster's problem.

-Chris
 
What do you mean by "quoting"? Your reply looks identical to Tim's (which
looks just like this one). Both have the original post line prefixed with a
">" character. This has been a newsgroup standard since before HTML
existed. If you don't see these messages that way then I'd say it's your
reader's problem, not the poster's problem.

By quoting I mean, that you all post your answer on top and the original
message you are referring to at the end.
In germany we quote like I do. First the text we referre to and than the
answer. And if we referre to different parts, than we do it like this:
original 1

answer 1
original 2

answer 2

This way, it is easier to read and unterstand the posting.

But maybe this is just in german newsgroups. So never mind.

Lars
 
What you are saying is correct if the original post contains more than one
question. But when there is only one question, what does it matter.

I also find it better to reply ontop (that is before) the original post,
this way there is no need generally, to scroll to see the answer. An example
is this post I am posting now.

Simon.
 
Simon said:
What you are saying is correct if the original post contains more than one
question. But when there is only one question, what does it matter.

Because when you post ToFu (Text ontop, full quote underneath) as you
did, it is harder to understand everything. If you wish to read the
question first, then you have to scroll down and search for the right
post. Because, as you also did, you did not remove unnecessary parts of
the original post, like qoutes that are not relevant.
I also find it better to reply ontop (that is before) the original post,
this way there is no need generally, to scroll to see the answer. An example
is this post I am posting now.

But as I mentioned above, if you would like to read the original
question, you have to scroll down and search in the full quote for the
relevant parts.
And by not removing unrelevant parts the post becomes bigger and bigger
and bigger.

Maybe some will realice this and change their way of posting, maybe some
will not :(

Lars
 
I don't think people should change the way they post. Generally when you
read usenet you have already read the previous post anyway as you read them
sequentially top to bottom so what does it matter even if the previous
content is included or not.

Unless of course you read bottom up?

I hate the fact I have to scroll down to see the replies when I have already
read the original content, I don't want to read it more than once!

Simon.
 
Simon Hart schrieb:
[schnipp]

It is common in the rest of the usenet to not post tofu.

And if you follow a thread and a new post comes, than maybe you have to
read the one it is pointing to. Any why include all the posts? It just
increases traffic. It is just because you are to "foul" to post
corerctly or to delete the things you don't refer to.

But it is like making a war against windmills ;)

So never mind.

Lars
 
Back
Top