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: