PC Review


Reply
Thread Tools Rate Thread

application directory

 
 
Felix González
Guest
Posts: n/a
 
      18th Mar 2005
Hi,

How to know the application directory in .NET?

thanks


 
Reply With Quote
 
 
 
 
Ken Tucker MVP
Guest
Posts: n/a
 
      18th Mar 2005
Hi,

Dim strPath As String
strPath = System.IO.Path.GetDirectoryName(
system.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)

Ken
--------------------

"Felix González" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> Hi,
>
> How to know the application directory in .NET?
>
> thanks
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005


 
Reply With Quote
 
Sergey Bogdanov
Guest
Posts: n/a
 
      18th Mar 2005
Try this:

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

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com


Felix González wrote:
> Hi,
>
> How to know the application directory in .NET?
>
> thanks
>
>

 
Reply With Quote
 
Arun
Guest
Posts: n/a
 
      18th Mar 2005
Hi,

private string ApplicationPath()
{
return new System.IO.FileInfo(System.Reflection.
Assembly.GetExecutingAssembly().GetName().CodeBase.ToString()).DirectoryName;
}

Hope this helps,

Regards,
Arun
www.innasite.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the obj directory used for if I look under the application directory. Tony Johansson Microsoft C# .NET 1 7th Feb 2011 03:52 PM
AD/AM using Active Directory Application Mode in my application Dave Microsoft Windows 2000 Active Directory 3 5th Jan 2006 11:30 PM
How to get the application directory in winbase application ad Microsoft C# .NET 2 10th Jun 2005 05:05 AM
Urgent! Problem debugging application - error: Directory is not a valid working directory. VM Microsoft VC .NET 1 9th Feb 2004 06:01 PM
RE: How I get the application directory Yan-Hong Huang[MSFT] Microsoft Dot NET Framework 0 26th Aug 2003 06:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:48 AM.