Wednesday, October 7, 2009

How to get executable file information in C#

using System.IO;

string executableName = Application.ExecutablePath;
MessageBox.Show(executableName);
FileInfo executableFileInfo = new FileInfo(executableName);
string executableDirectoryName = executableFileInfo.DirectoryName;
MessageBox.Show(executableDirectoryName);

No comments:

Post a Comment