Is there a way to set the focus to an already opened window using cmd/batch? It should act just like clicking the task bar icon. Or like double-clicking the window in Task-Manager. I know there are many similar questions, but i couldn't find an answer to this "simple" task, I just can't imagine this is to be so difficult to do...
example: I have Outlook opened somewhere in the background. When executing the command, the open window should come to the front. If no window is open, it should open a new one.
What i tried:
start outlook
-> this will always open a new window
start outlook /[non-existing command]
-> this is the only way i found to get the focus on an open window, followed by an error since it doesn't know the command, but Outlook does not open unless it's already running. An option might be, to tell Outlook not to do anything?