Taskbar icon status is blinking #19077

Closed
opened 2026-01-31 06:33:06 +00:00 by claunia · 4 comments
Owner

Originally created by @eddiezato on GitHub (Dec 15, 2022).

Windows Terminal version

1.16.3464.0

Windows build number

10.0.22621.0

Other Software

PowerShell 7.3.1

Steps to reproduce

Open pwsh in the folder with many small files and run the command:

ls '*.*' | % { Compress-Archive -Path $_ -DestinationPath ($_.BaseName + '.zip') }

Expected Behavior

No response

Actual Behavior

The taskbar icon will behave as follows:

out

Originally created by @eddiezato on GitHub (Dec 15, 2022). ### Windows Terminal version 1.16.3464.0 ### Windows build number 10.0.22621.0 ### Other Software PowerShell 7.3.1 ### Steps to reproduce Open `pwsh` in the folder with many small files and run the command: ```PowerShell ls '*.*' | % { Compress-Archive -Path $_ -DestinationPath ($_.BaseName + '.zip') } ``` ### Expected Behavior _No response_ ### Actual Behavior The taskbar icon will behave as follows: ![out](https://user-images.githubusercontent.com/11173476/207776960-c0a5d674-4b19-444b-b9b4-315cdbdeaa4e.gif)
claunia added the Issue-QuestionNeeds-TriageIssue-BugResolution-External labels 2026-01-31 06:33:07 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Dec 15, 2022):

Does this repro the same if you ran the same command in the vintage console? (conhost pwsh in the Run dialog should work).

Oh, I wonder if powershell is setting the taskbar progress with VT, but because the files are so small, they complete almost immediately, resetting the progress state back. @stevel-msft does that sound like something powershell would do?

@zadjii-msft commented on GitHub (Dec 15, 2022): Does this repro the same if you ran the same command in the vintage console? (`conhost pwsh` in the Run dialog should work). Oh, I wonder if powershell is setting the taskbar progress with VT, but because the files are _so_ small, they complete almost immediately, resetting the progress state back. @stevel-msft does that sound like something powershell would do?
Author
Owner

@eddiezato commented on GitHub (Dec 15, 2022):

@zadjii-msft Nope, it's ok in the old console.

I first saw this a couple of updates ago. But I'm not sure who is to blame, wt or pwsh. I have a script that runs foreach in parallel with each loop as a background job. In the loops, I run some file conversion tools. At the same time, I show overall progress of the script in the tab title and on the taskbar icon. This blinking thing keeps interrupting the progress display.

This command to compress a bunch of small files is just a quick example to show and reproduce what happens.

@eddiezato commented on GitHub (Dec 15, 2022): @zadjii-msft Nope, it's ok in the old console. I first saw this a couple of updates ago. But I'm not sure who is to blame, `wt` or `pwsh`. I have a script that runs `foreach` in parallel with each loop as a background job. In the loops, I run some file conversion tools. At the same time, I show overall progress of the script in the tab title and on the taskbar icon. This blinking thing keeps interrupting the progress display. This command to compress a bunch of small files is just a quick example to show and reproduce what happens.
Author
Owner

@eddiezato commented on GitHub (Dec 15, 2022):

$files = ls '*.*'
for($i = 0; $i -lt $files.Length; $i++) {
    $percent = [Math]::Round(100 * $i / $files.Length)
    Write-Host "`e]9;4;1;$percent`e\" -NoNewLine # show progress on taskbar icon
    Compress-Archive -Path $files[$i] -DestinationPath ($files[$i].BaseName + '.zip')
}

out

@eddiezato commented on GitHub (Dec 15, 2022): ```PowerShell $files = ls '*.*' for($i = 0; $i -lt $files.Length; $i++) { $percent = [Math]::Round(100 * $i / $files.Length) Write-Host "`e]9;4;1;$percent`e\" -NoNewLine # show progress on taskbar icon Compress-Archive -Path $files[$i] -DestinationPath ($files[$i].BaseName + '.zip') } ``` ![out](https://user-images.githubusercontent.com/11173476/207873377-109aaf66-801e-4dcc-b26b-4ed12109710b.gif)
Author
Owner

@zadjii-msft commented on GitHub (Jan 16, 2023):

This might just end up by-design. Seems like Compress-Archive (or some other machination of powershell) is setting the taskbar progress, but it's setting the icon to the progress state for such a short period of time that it effectively just flashes the underline like that.

I'd reckon there's probably a way to disable this in PowerShell, but alas, that I don't know. @stevel-msft might know better than myself.

/aside: I do like the way you're wrapping up that Compress-Archive command with progress bar sequences in that above snippet. I might borrow that for some of my own scripts 😄

@zadjii-msft commented on GitHub (Jan 16, 2023): This might just end up by-design. Seems like `Compress-Archive` (or some other machination of powershell) is setting the taskbar progress, but it's setting the icon to the progress state for such a short period of time that it effectively just flashes the underline like that. I'd reckon there's probably a way to disable this in PowerShell, but alas, that I don't know. @stevel-msft might know better than myself. /aside: I do like the way you're wrapping up that `Compress-Archive` command with progress bar sequences in that above snippet. I might borrow that for some of my own scripts 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19077