Batch – minimize window while running a loop command (not start minimized)

Question:

I’m wondering if there is a way to minimize a batch window after it runs a certain command. I already know start /min and tricks to START the window minimized but what about while it’s running a loop or timeout?

Let’s say:

Right now i’m calling an autoit script in the bat file to hide the window while the command is running with :

but i’m looking for a pure batch/powershell/vbs solution that can be coded directly in the .bat file.

Thank you for your time!

Answer:

Use PowerShell’s invocation options, executing no command or script.

FWIW, -window hidden is also available if you wish.

Source:

Batch – minimize window while running a loop command (not start minimized) by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply