Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress on Windows7 taskbar from PowerShell Write-Progress cmdlet #645

Closed
Maximus5 opened this issue Jul 31, 2015 · 11 comments
Closed

Progress on Windows7 taskbar from PowerShell Write-Progress cmdlet #645

Maximus5 opened this issue Jul 31, 2015 · 11 comments
Assignees

Comments

@Maximus5
Copy link
Owner

Originally reported on Google Code with ID 645

OS version: Win7   SP:any   x86/x64:both
ConEmu version: 2012.07.16
Far version (if you are using Far Manager): N/A


It would be fantastic for PowerShell users if the progress bar displayed by Write-Progress
was also shown in the taskbar icon.

Simple one-liner for testing (in powershell.exe):

0..100 | foreach {Write-Progress Test Progress -PercentComplete $_; sleep -m 100}

Thanks!

Reported by ajansveld on 2012-07-18 13:25:33

@Maximus5
Copy link
Owner Author

I don't use PowerShell, so here is stupid question.

Write-Progress cmdlet is hardcoded to powershell.exe, or there is corresponding ps1-file?

Reported by ConEmu.Maximus5 on 2012-07-18 14:32:05

@Maximus5 Maximus5 self-assigned this Jul 31, 2015
@Maximus5
Copy link
Owner Author

The Write-Progress cmdlet is built in to PowerShell. Since the progress bar is always
shown on the same part of the screen, using predefined characters and colors, the simplest
implementation is probably to use the Progress "AI" to capture this from the buffer.


Reported by ajansveld on 2012-07-18 14:40:32

@Maximus5
Copy link
Owner Author

Thought about this some more - if the native implementation in ConEmu is not feasible,
users can use the attached script to override Write-Progress. It also modifies the
PS Prompt function so the icon progress is removed when the prompt returns.

The script needs to be dot-sourced like this:
  . .\Write-ConEmuProgress.ps1

Then the sample can be run normally:
  0..100 | foreach {Write-Progress Test Progress -PercentComplete $_; sleep -m 100}

It still would be great to have a native implementation so users do not need to modify
their environment/code.

Reported by ajansveld on 2012-07-18 15:41:43


- _Attachment: [Write-ConEmuProgress.ps1](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-645/comment-3/Write-ConEmuProgress.ps1)_

@Maximus5
Copy link
Owner Author

Reported by ConEmu.Maximus5 on 2012-07-18 17:21:19

  • Status changed: Accepted

@Maximus5
Copy link
Owner Author

120719

Reported by ConEmu.Maximus5 on 2012-07-19 22:07:55

  • Status changed: Fixed

@Maximus5
Copy link
Owner Author

Sorry, I do not see this working yet. Even tried a clean install.

Reported by ajansveld on 2012-07-20 15:45:42

@Maximus5
Copy link
Owner Author

"Inject ConEmuHk"? PS version?

Reported by ConEmu.Maximus5 on 2012-07-20 16:12:32

@Maximus5
Copy link
Owner Author

Tried all states of "Inject ConEmuHk". Tried on 2 different machines, both Win7 (one
has PS version 2, the other has the v3 RC).

Thanks!

Reported by ajansveld on 2012-07-20 16:22:31

@Maximus5
Copy link
Owner Author

Reported by ConEmu.Maximus5 on 2012-07-20 16:26:21

  • Status changed: Started

@Maximus5
Copy link
Owner Author

120722

Reported by ConEmu.Maximus5 on 2012-07-22 23:46:13

  • Status changed: Fixed

@Maximus5
Copy link
Owner Author

Works like a charm - thanks!

Reported by ajansveld on 2012-07-24 15:12:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant