473,394 Members | 1,902 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,394 software developers and data experts.

Executable File Name for Console Application

How do I get my console application's executable file name with path? I
would like to extract the path and do a
System.IO.Directory.SetCurrentDirectory().

Thanks,
Johnnie
Nov 16 '05 #1
3 18012


Process.GetCurrentProcess().MainModule.FileName
--Richard
"Johnnie Norsworthy" wrote:
How do I get my console application's executable file name with path? I
would like to extract the path and do a
System.IO.Directory.SetCurrentDirectory().

Thanks,
Johnnie

Nov 16 '05 #2
"Richard" <Ri*****@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...
Process.GetCurrentProcess().MainModule.FileName

"Johnnie Norsworthy" wrote:
How do I get my console application's executable file name with path? I
would like to extract the path and do a
System.IO.Directory.SetCurrentDirectory().


Thanks!
Nov 16 '05 #3

Process.GetCurrentProcess().MainModule.FileName
"Johnnie Norsworthy" wrote:
How do I get my console application's executable file name with path? I
would like to extract the path and do a
System.IO.Directory.SetCurrentDirectory().

Thanks,
Johnnie

Nov 16 '05 #4

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

Similar topics

2
by: Kishore | last post by:
Hi, I have a small console application written in c# that takes two arguments. I am using System.Diagnostics.Process.Start("cmdApp.exe", arguments) to start the application from another .net...
1
by: Scott Chang | last post by:
Hi all, I loaded the following program 'HelloMCPP' to my MS VC++ .NET (2002) that is installed on my Windows XP Professional PC: ------------------------------------- AssemblyInfo.cpp...
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...
2
by: Podi | last post by:
I followed the instructions from http://starship.python.net/crew/theller/moin.cgi/SingleFileExecutable Copied the second setup.nsi, setup.py, single.py and everything works like a champ. I...
2
by: gopal | last post by:
Hi I am a newbie and i am trying to create a resource file (resx) for a console C# application Can i go to current C# project and add a new resource file and then start adding values? Can...
0
by: gopal | last post by:
Hi, I want to create a reosource for use in my console application. I tried creating a new reosurce file from Assembly Resource File - new Item in my C# console project. When i run the...
3
by: rohan_from_mars | last post by:
I changed my solution name to a new name, but still visual studio 2003 builds the executable with the old solution name. Also, I am unable to change the name from Project properties dialog box....
24
by: arnuld | last post by:
i want to create a console application in C++ . what can be the 1st step ? NOTE: i did use Google but that gives me some VC++ based links using non-standard libraries.
6
by: jaikris317 | last post by:
I have a C# project that connects to an Oracle server using ODBC Everything works fine if I keep the file name length less than 23 characters (including ".exe") If the executable file name...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.