How to get name of the standalone application with .exe extension while it is executing?

3 次查看(过去 30 天)
I have a standalone application, which is invoked with-
matlabXX.exe 'abc.txt'
Now when it is executing, I can get 'abc.txt' using vararg but how can I get 'matlabXX.exe'?

回答(2 个)

Walter Roberson
Walter Roberson 2023-3-14
Using .exe implies MS Windows.
You can use System.Diagonstics.Process and related facilities methods to find your current process identifier and use that to find the name of your process.

Image Analyst
Image Analyst 2023-3-14
See attached utility that I use to get the filename of the executing standalone executable.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by