473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 10396
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 path in the file://c/winnt/.../filename.exe format,...
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 application.exe folder? In VB6 you simply used App.Path and...
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 console application?(we can't use application because...
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 & " -listinfo >" & Application.StartupPath &...
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 Application, so I can't access StartupPath. Is there a way...
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? Thanks. Sean
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 a Console Application the Application class is...
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 = My.Computer.FileSystem.CombinePath(Application.StartupPath, "\Settings\Config...
0
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
I am using BulkLoad from .NET application as follows SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class obj = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class(); obj.ConnectionString =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.