Close

Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,528
    Blog Entries
    1

    Default OT: Hide|Show taskbar with Nircmd

    Good day

    A number of "things"...

    Thing 1: On one hand, I am not sure of many of you, but I do prefer to have the taskbar visible - as I do use the Quick Launch element of the taskbar somewhat frequently. This simply means that using the "Auto-hide the taskbar" functionality is really not an option for me.

    Thing 2: On the other hand, screen real estate with RML Lab software is always at a loss - so doing all that one can to make available that real estate is an important one. The question then is, "How does one make use of all available real estate while maintaining functionality?" Simple...NirCmd!

    Thing 3: Nircmd to the rescue...
    Nircmd has a command entitled, "win" that performs a number of feature-sets...one being able to call a "class" - with class simply being used in object-oriented programming to describe one or more objects. One such class is "Shell_TrayWnd".

    So, I have developed two routines, the first, for hiding the taskbar then launching SAC|SAW, and the second, for closing SAC|SAW then showing the taskbar. All seems simple enough.

    The following are two condensed versions of the routines...all un-commented for the sake of simplicity...

    ...first, the hide|launch routine...
    @echo off
    nircmd.exe win hide class Shell_TrayWnd
    nircmd elevatecmd exec max C:\RML\SAC\SAC64.exe
    exit

    ...then the close|show routine...
    @echo off
    nircmd win close title "SAC64"
    nircmd wait 1500
    nircmd win show class Shell_TrayWnd
    exit

    All-in-all...pretty slick...and well worth the consideration!
    PS: Here again is a link to NirCmd.

    Thing 4: Using .cmd instead of .bat - "And now, for something completely different"...
    As I understand it, .bat is the old 16-bit naming convention, and .cmd is the newer 32-bit naming convention. More importantly, cmd.exe is 64-bit whilst cmd.exe*32 is 32-bit...obviously. So all 64-bit OS's will use the 64-bit version of .cmd. Both of these "facts" were unknown to me until a few weeks back...so I now use .cmd instead of .bat.

    Anyhow, I hope that some will find the above information of some practicable use?

  2. #2
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,528
    Blog Entries
    1

    Default Re: OT: Hide|Show taskbar with Nircmd

    Good day,

    As an aside, the above routine really does NOT DO as expected...! My sincerest apologies...

    To obtain the expected results, I have come across a handy little utility called, "toggleTaskbarAutohide".
    ***8226; You may download the file here: [Click_me]

    To make this utility actually work, unzip the contents and copy the exe to the Windows folder.

    Then consider the following routine...

    @echo off
    nircmd elevatecmd exec max toggleTaskbarAutohide.exe
    nircmd elevatecmd exec max C:\RML\SAC\SAC64.exe
    nircmd wait 1000
    nircmd win close title "SAC64"
    nircmd wait 3000
    nircmd elevatecmd exec max toggleTaskbarAutohide.exe
    exit

    The above now does what it is supposed to do.

    Again my apologies for the mix up!
    Last edited by mr_es335; 09-09-2021 at 05:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •