@echo off
:: 啟動 Task Manager 並最小化
start /min taskmgr

:: 等待幾秒，確保 Task Manager 已啟動
timeout /t 3 /nobreak >nul

:: 使用 PowerShell 模擬按下 Alt+Space → n (最小化)，確保縮到 Tray
powershell -command "$wshell = New-Object -ComObject wscript.shell; $wshell.AppActivate('Task Manager'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('% ') ; Start-Sleep -Milliseconds 200; $wshell.SendKeys('n')"
exit