hey all,
I'm developing a small application,and i what i need to do is when i rename the exe file into some thing,(ex: abc.exe to aaa.exe) it has to show a message box showing the new name.(aaa).
help needed ASAP.
thanks in advance,
drax
hey all,
I'm developing a small application,and i what i need to do is when i rename the exe file into some thing,(ex: abc.exe to aaa.exe) it has to show a message box showing the new name.(aaa).
help needed ASAP.
thanks in advance,
drax
Jump to PostThis will give you the current exe's name (including .exe extension)
(The application class is found in the System.Deployment namespace)
System.IO.Path.GetFileName(Application.ExecutablePath());
To get the exe name with no extension:
System.IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath());
To get the exe's full path:
Application.ExecutablePath();
not sure i've understood.. but try store the name in a variable before renaming (using some class in system.Io namespace)
This will give you the current exe's name (including .exe extension)
(The application class is found in the System.Deployment namespace)
System.IO.Path.GetFileName(Application.ExecutablePath());
To get the exe name with no extension:
System.IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath());
To get the exe's full path:
Application.ExecutablePath();
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.