472,333 Members | 1,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

Application.StartupPath in console application

kd
Hi All,

Is there an equivalent for Application.StartupPath in a console application?

kd
Nov 21 '05 #1
4 10214
KD,

Is there an equivalent for Application.StartupPath in a console
application?

Can you explain this question a little bit more. I thought that a console
applicion was starting in the path you start it on the console?

Cor
Nov 21 '05 #2
kd

Is there someway to capture this path through code?

kd.

"Cor Ligthert" wrote:
KD,

Is there an equivalent for Application.StartupPath in a console
application?

Can you explain this question a little bit more. I thought that a console
applicion was starting in the path you start it on the console?

Cor

Nov 21 '05 #3
Yes, but it's a cludge.
Dim strStartupDir As String = CurDir()

MsgBox(strStartupDir)

"kd" <kd@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com...

Is there someway to capture this path through code?

kd.

"Cor Ligthert" wrote:
KD,
>
> Is there an equivalent for Application.StartupPath in a console
> application?
>

Can you explain this question a little bit more. I thought that a
console
applicion was starting in the path you start it on the console?

Cor

Nov 21 '05 #4
"kd" <kd@discussions.microsoft.com> schrieb:
Is there an equivalent for Application.StartupPath in a console
application?


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

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Frank Rizzo | last post by:
How to get Application Path? I can't really use System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase because it returns the...
5
by: Robert Magnusson | last post by:
Hi All, This is sure to be an easy question. I am wondering what the accepted standard is for referencing a sub-folder below the...
5
by: Eranga | last post by:
In c# windows applicatiopns the Application.StartupPath can be used to find the path for the executable file. How can the same be found for a...
8
by: jcrouse | last post by:
I am trying to run a command from a command prompt using the shell command. Here is the syntax I want to execute: Shell(lblMameExePath.Text & "...
2
by: Ron | last post by:
Hello, I would like to retrieve the startupPath from a console application. It appears that a console application does not recognize...
1
by: Sean | last post by:
Hi I created a VB.NET console app. I try to use the Application.StartupPath() but got an error: Name 'Application' is not declared. Any idea? ...
4
by: Philip Wagenaar | last post by:
How can I find out from which folder my console application is launched? In a Windows Forms application I can use Application.StartupPath, but in...
3
by: hayworth | last post by:
I had some code to build the name of a file: ' Build the name of the XML config file. g_strFiles.strConfig =...
0
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
I am using BulkLoad from .NET application as follows SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class obj = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.