Windows 7 taskbar as sidebar, minimum width fixed
One perfect working solution would be:
- create a ThinTaskbar.bat file
- enter the following content:
@echo off
echo ThinTaskbar
echo Please wait a few secconds...
net stop "UxSms"
net start "UxSms"
- save and close
- turn on the following taskbar options: lock and autohide
- execute batch script with administrator privileges
- done!
Now you can disable autohide, if you want. The script must be applied after each reboot.
Source: Youtube
I have a solution that I am using right now. I spent hours coding this and am very satisfied that it works perfectly for me. Go ahead and use it if you want, just credit me (drange17) if you wanna post this code online in forums. I would like to, in turn, credit Lexikos for the code for ConsoleSend.
Firstly, I placed a shortcut to Command Prompt called "cmd.lnk" in C:\Program Files. I go to this shortcut's properties>>shortcut tab>>advanced>>enable run as administrator.
Secondly, I downloaded AutoHotkey and put it to run at startup (place a shortcut to AutoHotkey in the Start Menu Startup folder), with the following code (which is definitely not very elegant, I'm sure someone can do better, but it does the job of narrowing the vertical taskbar for me):
Sleep, 15000
SendInput {LWin Down}r{LWin Up}
IfWinExist, Run
WinActivate
Sleep, 500
SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
SendInput {Enter}
WinWait, Taskbar and Start Menu Properties
SendInput {Tab}{Space}{Enter}
WinWaitClose
Run C:\Program Files\cmd.lnk
WinWait, Administrator: cmd ahk_class ConsoleWindowClass
winwaitactive Administrator: cmd ahk_class ConsoleWindowClass
ConsoleSend("net stop uxsms", "ahk_class ConsoleWindowClass")
ConsoleSend("`r", "ahk_class ConsoleWindowClass")
Sleep, 3000
ConsoleSend("net start uxsms", "ahk_class ConsoleWindowClass")
ConsoleSend("`r", "ahk_class ConsoleWindowClass")
Sleep, 3000
ConsoleSend("exit", "ahk_class ConsoleWindowClass")
ConsoleSend("`r", "ahk_class ConsoleWindowClass")
WinWaitClose
SendInput {LWin Down}r{LWin Up}
IfWinExist, Run
WinActivate
Sleep, 500
SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
SendInput {Enter}
WinWait, Taskbar and Start Menu Properties
SendInput {Tab}{Space}{Enter}
Run outlook.exe
ConsoleSend(text, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="")
{
WinGet, pid, PID, %WinTitle%, %WinText%, %ExcludeTitle%, %ExcludeText%
if !pid
return false, ErrorLevel:="window"
if !DllCall("AttachConsole", "uint", pid)
return false, ErrorLevel:="AttachConsole"
hConIn := DllCall("CreateFile", "str", "CONIN$", "uint", 0xC0000000
, "uint", 0x3, "uint", 0, "uint", 0x3, "uint", 0, "uint", 0)
if hConIn = -1
return false, ErrorLevel:="CreateFile"
VarSetCapacity(ir, 24, 0) ; ir := new INPUT_RECORD
NumPut(1, ir, 0, "UShort") ; ir.EventType := KEY_EVENT
NumPut(1, ir, 8, "UShort") ; ir.KeyEvent.wRepeatCount := 1
Loop, Parse, text ; for each character in text
{
NumPut(Asc(A_LoopField), ir, 14, "UShort")
NumPut(true, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := true
gosub ConsoleSendWrite
NumPut(false, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := false
gosub ConsoleSendWrite
Sleep, 10
}
gosub ConsoleSendCleanup
return true
ConsoleSendWrite:
if ! DllCall("WriteConsoleInput", "uint", hconin, "uint", &ir, "uint", 1, "uint*", 0)
{
gosub ConsoleSendCleanup
return false, ErrorLevel:="WriteConsoleInput"
}
return
ConsoleSendCleanup:
if (hConIn!="" && hConIn!=-1)
DllCall("CloseHandle", "uint", hConIn)
DllCall("FreeConsole")
return
}
Here's the resulting thin vertical taskbar:
Actually I asked a duplicate to this question, and it is still not solved Vertical taskbar on windows server 2008 too wide
But I can point you to this link:
http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/when-vertical-cannot-make-taskbar-as-thin-as/9ecf0b1c-e66d-497c-8c2b-5ef3965e2b59
Basically it says that the small icons are virtually wider than they appear (but not higher) and that this is by design. You cannot change the width of the taskbar below the virtual width of the icons.
The reason it allows a smaller 'hight' when horizontal is because each icon still has a wide width, so it stays easily target-able with a fingertip.
Maybe someone can use this to create a solution : )