Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the name of the EXE currently running

Status
Not open for further replies.

crystalkiwibruce

Programmer
Feb 16, 2011
104
NZ
I've got a VB 2010 project with a Main Application and a DLL with some common shared code I plan to use in other applications.

Inside the DLL code, I'd like to retrieve the name of the actual EXE currently running. I can get the name of the DLL, but I'd like the higher level EXE name as a string to place in a diagnostics file. Version Numbers would also be useful.
 

If these are all going to be .NET applications, this will return the name of the assembly calling the dll:

System.Reflection.Assembly.GetEntryAssembly().GetName().Name

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top