- Aug
- 2,033
- 82
Code:
@setlocal
@echo off
::
:: Batch file to Hide/Show the Windows 7 Taskbar, and StartButton
::
:: TODO: More error checking
::
iff %# eq 0 then
echo USAGE: %_BATCHNAME [Hide] [Show]
quit
endiff
set SW_HIDE=0
set SW_SHOW=1
set hwndTaskBar=%@winapi[user32,FindWindow,"Shell_TrayWnd",""]
set hwndStartButton=%@winapi[user32,FindWindow,"Button","Start"]
iff %1 eq hide then
set rc=%@winapi[user32,ShowWindow,%hwndTaskBar,%SW_HIDE]
set rc=%@winapi[user32,ShowWindow,%hwndStartButton,%SW_HIDE]
endiff
iff %1 eq show then
set rc=%@winapi[user32,ShowWindow,%hwndTaskBar,%SW_SHOW]
set rc=%@winapi[user32,ShowWindow,%hwndStartButton,%SW_SHOW]
endiff
endlocal