How to minimize all windows from DOS?

AuntPeggy

Final Approach
PoA Supporter
Joined
May 23, 2006
Messages
8,479
Location
Oklahoma
Display Name

Display name:
Namaste
I need to minimize all open windows and then restore them all from a script. Cannot use any third-party tools or write my own. Can use DOS command or key combination. Scripting language has access to keyboard, but not the <WIN> key.

I know the <WIN>D key combination will do exactly what I want, so the OS supports it somehow. Can you help?
 
I'm not sure if this will help however there is a script to clear the screen with an icon. Maybe a variation of that?

http://support.microsoft.com/default.aspx?scid=kb;en-us;190355
Nope. The ToggleDesktop icon is on the toolbar, but I don't want to use the mouse to click on it from the script because my purpose in this script is to change monitor resolution several times -- which would require lots of math to calculate the x-y coordinates of the icon.:frown2: I don't want to introduce anything that I have to explain to the FDA using more than a sentence.

Thanks.
 
Last edited:
Find out what the command is that is being used when you right click on your system tray and click "show desktop".
 
how about a scf script like

Code:
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
 
C:\Documents and Settings\[username]\Application Data\Microsoft\Internet Explorer\Quick Launch\show desktop.scf
 
Even better, for programmatic use:

%HOMEPATH%\Application Data\Microsoft\Internet Explorer\Quick Launch\show desktop.scf
 
Even better, for programmatic use:

%HOMEPATH%\Application Data\Microsoft\Internet Explorer\Quick Launch\show desktop.scf
You da' man! After putting quotes around, it works like a charm.

Thanks.
 
I tried that on my Vista system and that script is not found. As far as I can tell "Applications Data" is renamed to appData but even then there is no "Show Desktop.scf"

The contents of the script on my XP system are the script I posted above.

Joe
 
I tried that on my Vista system and that script is not found. As far as I can tell "Applications Data" is renamed to appData but even then there is no "Show Desktop.scf"

The contents of the script on my XP system are the script I posted above.

Joe
So far, I haven't been required to test this code on Vista. But that day will come.
 
Sorry for necroing a REALLY old thread, but whoever it may help, the new reference to the show desktop.scf file is now (Windows 7): %HOMEPATH%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\Show Desktop.lnk
 
Use Command.com or the command prompt. From Start > Run > type [cmd.exe] and Enter.

Then type in any DOS command you like. I run .bat scripts in XP all the time.
 
Back
Top