Hi @~OSD~ ,
Also try:
Dim AllProcesses As Process() = Process.GetProcesses()
For Each process In AllProcesses
If process.MainWindowTitle <> "" Then
Dim name As String = process.ProcessName
If name = "iexplore" OrElse name = "msedge" OrElse name = "firefox" OrElse name = "chrome" Then
process.CloseMainWindow()
End If
End If
Next
The request to exit the process by calling CloseMainWindow does not force the application to quit. The application can ask for user verification before quitting, or it can refuse to quit.
Best Regards,
Xingyu Zhao
*
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.