Used this: Process.GetCurrentProcess.MainWindowTitle
And it worked fine. but in some process I got an error. I solved this error by adding System.Diagnostics. Unfortunately, it does not display any name now. Anyone know how to solve this problem?
This doesn’t get the process name. It gets the main window title of the running job, so if you have a mainframe connection - for example - you’ll get the name of the mainframe window.