Thursday, November 2, 2017

batch - BAT: opening X amount of programs/files maximized but also minimized


I currently have this piece of BAT code that opens all files in a folder maximized.


for %%i in (C:\Users\Programs\*) do start /max %%i && timeout /t 10

What I want to achieve, is for the code to also minimize all the programs after it has opened them in a maximized state. Is this possible in some way?


Answer



Perhaps adding this line next will help:


powershell -command "(New-Object -ComObject Shell.Application).MinimizeAll()"

It will minimize all windows (not just the ones you launched or are maximized).


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...