473,473 Members | 4,297 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Get Application EXE name in VS.2005

How does one get the name of the executable that is running in VS.2005
using VB.net. I have looked at the my.application object but I can
only find My.Application.Info.DirectoryPath which does not include the
executable name.

Thanks in Advance

Laurence

Aug 7 '06 #1
14 17705

Larry wrote:
How does one get the name of the executable that is running in VS.2005
using VB.net. I have looked at the my.application object but I can
only find My.Application.Info.DirectoryPath which does not include the
executable name.

Thanks in Advance

Laurence
I use Application.ProductName.

Set in the Assembly Info window.

Aug 7 '06 #2

Larry wrote:
How does one get the name of the executable that is running in VS.2005
using VB.net. I have looked at the my.application object but I can
only find My.Application.Info.DirectoryPath which does not include the
executable name.

Thanks in Advance

Laurence
Sorry, misread your question. The EXE filename should be in:

Application.ExecutablePath

An easy way to glean out the EXE filename, use the FileInfo class.

Aug 7 '06 #3
Is that My.application.ExecutablePath?

I don't see it in the my.application object,
nor do I see an Application object any where.

Laurence

za***@construction-imaging.com wrote:
Larry wrote:
>How does one get the name of the executable that is running in VS.2005
using VB.net. I have looked at the my.application object but I can
only find My.Application.Info.DirectoryPath which does not include the
executable name.

Thanks in Advance

Laurence

Sorry, misread your question. The EXE filename should be in:

Application.ExecutablePath

An easy way to glean out the EXE filename, use the FileInfo class.
Aug 7 '06 #4

Laurence wrote:
Is that My.application.ExecutablePath?

I don't see it in the my.application object,
nor do I see an Application object any where.

Laurence
Not sure what is going on. I enter Application and hit the dot, and a
list of properties show up from Intellisense.
>
za***@construction-imaging.com wrote:
Larry wrote:
How does one get the name of the executable that is running in VS.2005
using VB.net. I have looked at the my.application object but I can
only find My.Application.Info.DirectoryPath which does not include the
executable name.

Thanks in Advance

Laurence
Sorry, misread your question. The EXE filename should be in:

Application.ExecutablePath

An easy way to glean out the EXE filename, use the FileInfo class.
Aug 7 '06 #5
its just as Zach said

Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application
--
-iwdu15
Aug 7 '06 #6
yea, its supposed to. Not everything has to start with "Me" or "My"....im
confused on what your confused about?
--
-iwdu15
Aug 7 '06 #7
i keep thinking of more ways to explain it....

Application is under the System namespace, and since your importing the
System namespace automatically, its the same as typing

System.Application
hope that explains it a lil better
--
-iwdu15
Aug 7 '06 #8
there are Objects and Classes that arent part of your form or project...so
they cant be accessed using "Me.". Application is a good example of that.
There are many many many more things that are accessed without the Me (or My
in 2005) keyword(s)....
--
-iwdu15
Aug 7 '06 #9
"iwdu15" <jmmgoalsteratyahoodotcomschrieb:
Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application
It's 'System.Windows.Forms.Application'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Aug 7 '06 #10
When I type "Application" I do not get a "." or intellisense,
I do have Windows.Systems.Forms under my references folder.

Is it because this is a class Library project?

I created a new windows project and when I type "Application"
I do get the dot and intellisense.

There must be something different about a Class library project.

Thank You for you help.

Laurence

Herfried K. Wagner [MVP] wrote:
"iwdu15" <jmmgoalsteratyahoodotcomschrieb:
>Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application

It's 'System.Windows.Forms.Application'.
Aug 7 '06 #11
When I type "system.Windows.Forms.Application." then I get the dot
and intellisense.
I placed an "Inherits System.Windows.Forms.Form"
at the top of the class, but typing in "Application."
still doesn't do anything, I still have to
type "system.Windows.Forms.Application."

Laurence

Herfried K. Wagner [MVP] wrote:
"iwdu15" <jmmgoalsteratyahoodotcomschrieb:
>Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application

It's 'System.Windows.Forms.Application'.
Aug 7 '06 #12
I put in an "imports.System.Windows.Forms"
and now it is working,

Thank You for your help,

Laurence

Herfried K. Wagner [MVP] wrote:
"iwdu15" <jmmgoalsteratyahoodotcomschrieb:
>Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application

It's 'System.Windows.Forms.Application'.
Aug 7 '06 #13

Larry wrote:
I put in an "imports.System.Windows.Forms"
and now it is working,

Thank You for your help,

Laurence

Herfried K. Wagner [MVP] wrote:
"iwdu15" <jmmgoalsteratyahoodotcomschrieb:
Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application
It's 'System.Windows.Forms.Application'.
Don't tell us, your app is not a standard windows app, right? Maybe a
Console app? If you create an using the standard windows application
template, System.Windows.Forms is automatically included and you do not
have to Imports it anywhere.

Aug 8 '06 #14
My App is a class library, to be compiled into a DLL.

If you create a new project as a windows app, it comes with the
System.Windows.Forms.

When you create a new project as a Class Library, it doesn't come with
System.Windows.Forms. Even when you add a reference to the
system.windows.forms under a reference folder, you still
have to have "Imports System.Windows.Forms"
to get at the Application Object.

Laurence
za***@construction-imaging.com wrote:
Larry wrote:
>I put in an "imports.System.Windows.Forms"
and now it is working,

Thank You for your help,

Laurence

Herfried K. Wagner [MVP] wrote:
>>"iwdu15" <jmmgoalsteratyahoodotcomschrieb:
Me.Label1.Text = Application.ExecutablePath

no me, no my, just Application
It's 'System.Windows.Forms.Application'.

Don't tell us, your app is not a standard windows app, right? Maybe a
Console app? If you create an using the standard windows application
template, System.Windows.Forms is automatically included and you do not
have to Imports it anywhere.
Aug 9 '06 #15

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

Similar topics

1
by: Sharon | last post by:
Hi all, Is it possible to programmatically get the IIS application name at run time? If so, how? A software package we bought requires some cache file generated on the server, since we have...
1
by: Dennis | last post by:
Hi, I am wondering that the Application Name in Virtual Directory is compulsory be non-empty field when configuring Virtual Directory for ASP.NET application? I realized some of my ASP.NET...
4
by: bruce | last post by:
Hello, I'm almost embarrassed to ask this question, but my searches have not yielded any results. How does one change what the Application.Name property returns in Access 2003? I see that it...
2
by: Chang | last post by:
how to get the name of a running application using C# e.g. if i have 20 dll files and my application name is MyGreatApplication then how to get the name "MyGreatApplication" at runtime? thx in...
1
by: Wilfried Mestdagh | last post by:
Hi, I try to make an about form and put it in my own namespace/class. It works but if I want to display eg application name, it does not. It display name of the calss where the aboutbox is in...
0
by: michael.k.baum | last post by:
Hi- I am having a problem with my application name not being displayed in the Open With dialog box application list. I have associated the ".idm" extension files with my application and that...
3
by: buran | last post by:
Dear ASP.NET Programmers, How can I get the name of my application programmatically? Also the path of the application. For instance, if my application is named "buran" and located in...
4
by: RJDev | last post by:
Hi, Is there anyone who can help me in resolving the Application Name of my IIS Aaplication. I want to check the application name to see what configuration i need to use because multiple virtual...
0
by: SugarDaddy | last post by:
I managed to get the UAC process pretty much understood. I create the uac.manifest file, the .rc file and generate the .RES file for my applications. I use the project properties to specify the...
2
by: 4.spam | last post by:
Hello, all. DB2 ESE v9.1.3, Windows XP. I want to change the application name of current connection. I have wrote such SP using sqleseti api call: --- #include <sqlenv.h> #include...
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
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
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...
1
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.