I would like to update my executable. To do this, I am first closing the executable's process (if open). Looking at my options, it looks like Process.CloseMainWindow is the recommended method.
How does the process decide what the main window is? I know how to set the application's main window, but I do not see an option to set the process' main window. The window I want to close is not the window opened on startup. It is also possible that the application will have multiple windows open. I haven't been able to find this information online.
I am using wpf if it is relevant.