Apr 25, 2012

How to get the file name of runing .Exe inside itself in VB.NET?

To get the file name of runing .Exe use following code:-

Example:-
Imports System.IO
Dim currentExePath As String
Dim fi As FileInfo
currentExeName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
fi = New FileInfo(currentExePath)
Label1.Text = fi.Name

No comments: