Skip to content

How to set Taskbar progress from a console app? #14268

Answered by zadjii-msft
timcassell asked this question in Q&A
Discussion options

You must be logged in to vote

Don't call GetConsoleWindow. That's not gonna work right in plenty of scenarios.

What you'll need is SetConsoleMode with ENABLE_VIRTUAL_TERMINAL_PROCESSING. Then, write to the console something like

"\x1b]9;4;1;50\x1b\\"

(My C# is rusty so I might not have escaped that string correctly)

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@timcassell
Comment options

@zadjii-msft
Comment options

@timcassell
Comment options

@j4james
Comment options

j4james Oct 26, 2022
Collaborator

@timcassell
Comment options

Answer selected by timcassell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants