Get the application exe name
The following are the different ways we can get the current exe name through code.
Method 1
System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].Name;
This returns the exe name.
Method 2
Application.ExecutablePath
This returns the path with exe name
Method 3
Environment.GetCommandLineArgs()[0]
This returns path with the exe name.
0 Comments:
Post a Comment
<< Home