Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch Desktop Command  (Read 2317 times)

0 Members and 1 Guest are viewing this topic.

wowmaniac123

    Topic Starter


    Rookie

    Batch Desktop Command
    « on: July 29, 2010, 03:24:51 PM »
    Hey. I was wondering if anyone knows a batch script that will show your desktop and minimize all programs. Thanks in advance for anyones help

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Batch Desktop Command
    « Reply #1 on: July 29, 2010, 04:53:54 PM »
    For batch code normally rundll32 can be helpful, but I had zero luck. This short little snippet will minimize all the open windows:

    Code: [Select]
    Set objShell = CreateObject("Shell.Application")
    objShell.MinimizeAll

    In case you're wondering, this little snippet will undo the previous script:

    Code: [Select]
    Set objShell = CreateObject("Shell.Application")
    objShell.UndoMinimizeALL

    Save each script separately with a vbs extension. They can be run from the command line as: cscript scriptname.vbs or they can be run in Windows as:  wscript scriptname.vbs

    Good luck.  8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    wowmaniac123

      Topic Starter


      Rookie

      Re: Batch Desktop Command
      « Reply #2 on: July 30, 2010, 11:32:55 AM »
      Thank you very much for your help. It works fine.