How to change Color Of Progress Bars From Green to Blue - Windows 7

Scotty 1 Reputation point
2023-04-09T11:00:28.12+00:00

Hello, I'd like to change the green color of all the progress bars to Blue (See image). I think I can do it in powershell but I can't find any info webwise on this procedure. I found something similar in the link below but not it's not what I want to do. I thought of using it & just type in the 'Blue' color instead of black but I don't want the Green background as I want it to stay the same. I sure hope somewone can please help & possibly give me something I can copy & paste in powershell. Thank You !  Blue Progress Bar

https://devblogs.microsoft.com/scripting/powertip-set-the-color-of-the-progress-bar-with-powershell/#:~:text=You%20can%20do%20this%20by%20altering%20the%20values,use%20the%20following%20code%20in%20PowerShell%3A%20%24Host.PrivateData.ProgressBackgroundColor%3D%E2%80%99Green%E2%80%99%20%24Host.PrivateData.ProgressForegroundColor%3D%E2%80%99Black%E2%80%99

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,099 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,329 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,906 Reputation points
    2023-04-09T19:10:07.03+00:00

    That's not a PowerShell object (i.e., it wasn't produced using the cmdlet Write-Progress), it's a dialog box, or maybe a form. The progress bar in your example is a graphic object.

    Here's an example of creating a form with a progress bar: https://mcpmag.com/articles/2014/02/18/progress-bar-to-a-graphical-status-box.aspx

    And another example: https://stackoverflow.com/questions/5643412/powershell-progress-bar-in-windows-forms

    You'll find lots more examples of doing this by searching for "powershell create dialog box with a progress bar"