Method to minimize all windows

This is not a question. I recently saw a discussion about opening an input dialog box, but the dialog box was sitting under all the user’s open windows. Someone suggested minimizing all open windows on the user’s machine, but some ways of doing that are laborious. It took a while to figure it out, but this seems to work ok:

  1. Create an Invoke Powershell activity.
  2. Properties > Input > CommandText: “$shell = New-Object -ComObject ‘Shell.Application’; $shell.minimizeall()”
1 Like

Click the far far far right end of your task bar, to the right of the task tray. There’s actually a button there that minimizes everything. It’s to the right of that thin white vertical line…


Then you just click the taskbar icon for the running UiPath process to pull it back up.

Here’s the selector for that “minimize everything” button:

<wnd app='explorer.exe' cls='Shell_TrayWnd' idx='*' />
<wnd aaname='Show desktop' cls='TrayShowDesktopButtonWClass' />

Better yet, minimize everything before the prompt appears (if I remember it right, it’s the Select File activity).

Paul - that is brilliant. It makes me wonder how long that button has been there…

I wonder if there’s a way to “insulate” each of these methods from Windows operating system variation. For example:

  • if you run a powershell command and the user doesn’t have powershell installed
  • or if the powershell command fails, but doesn’t raise an exception…
  • or if the user’s WinOS doesn’t have that button…
1 Like

Hi @tsverthoff,

There is a simple shortcut: Windows + D.

You can use Send Hotkey activity for that.

That is a good one. Thank you Gustavo.

1 Like