glazewm
glazewm copied to clipboard
"System tray" component seems to block explorer.exe (and system-tray items) from initializing if launched at logon
So, I wanted to launch GlazeWM automatically at logon, with admin privs so it can manage administrator terminals and the like.
I've assembled the following construct to configure the Task Scheduler correctly:
$trigger = New-ScheduledTaskTrigger -AtLogon -User "$env:USERDOMAIN\$env:USERNAME"
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERDOMAIN\$env:USERNAME" `
-LogonType Interactive -RunLevel Highest
$settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 `
-AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$action = New-ScheduledTaskAction `
-Execute "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\glzr-io.glazewm_Microsoft.Winget.Source_8wekyb3d8bbwe\glazewm.exe"
Register-ScheduledTask "GlazeWM" -Trigger $trigger -Principal $principal `
-Settings $settings -Action $action
Unfortunately, that leads to the logon process taking way longer than expected, and then eventually (due to a timeout, potentially?) it fades into a desktop with no taskbar. No daemons / tray-applications seem to be launched.
This can be mitigated by adding a delay to the scheduled task (i.e. $trigger.Delay = 'PT1S'
for one second); but still, whenever GlazeWM becomes launched, any taskbar-tray-applications that haven't loaded yet, will then never load.
I finally tracked the issue down to the "system tray"
bar-component. Disabling that in my config allows me to remove the Delay
, fixes the task-bar, and allows all of my tray-programs to initialize properly, even if they boot after GlazeWM.
(This seems to be a bug in the "system tray"
component, when it's got admin-level privs.)
im looking for a way to launch on start. did you solve it? how would you do this without admin privileges. also, is admin needed? What are you getting for launching with admin privileges?
This is exactly what I wanted to do and having problems with. I had some success with setting glazewm.exe
to always launch with admin and adding a vbs script that simply runs the exe into startup folder. No extra delays but it seems like the system tray icons does not properly update.
Issue seems to be with starting GlazeWM with admin privileges. Same thing happens if it is launched after boot with admin privs. Also trying to restart explorer.exe while GlazeWM has admin priv causes windows taskbar to lose all system tray icons and show no active programs.