Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Attaching PowerShell changes its colors and makes it hard to read

Mar
11
0
I'm a newbie to Take Command, and I'm still learning my way around.

I opened a PowerShell window outside of Take Command, then attached it to TC inside a tab. The default PowerShell colors of white on blue were turned into some shade of gray on magenta, which is very difficult to read.

Is there a way to keep the original colors when I attach an independently launched console window, PowerShell or otherwise?
 
Attaching PowerShell changes its colors and makes it hard to read

TCC 11.00.41 Windows XP [Version 5.1.2600]
TCC Build 41 Windows XP Build 2600 Service Pack 3

Mine stayed the same white on blue color as expected.

On Tue, Mar 9, 2010 at 9:22 AM, cwc <> wrote:


> I'm a newbie to Take Command, and I'm still learning my way around.
>
> I opened a PowerShell window outside of Take Command, then attached it to
> TC inside a tab. The default PowerShell colors of white on blue were turned
> into some shade of gray on magenta, which is very difficult to read.
>
> Is there a way to keep the original colors when I attach an independently
> launched console window, PowerShell or otherwise?
>
>
>
>
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
> I opened a PowerShell window outside of Take Command, then attached it
> to TC inside a tab. The default PowerShell colors of white on blue were
> turned into some shade of gray on magenta, which is very difficult to
> read.
>
> Is there a way to keep the original colors when I attach an
> independently launched console window, PowerShell or otherwise?

PowerShell is redefining the console color palette for its window. Take
Command will detect this when launching an app in a tab window, but it was
not detecting it when you attach a tab. I've added that to build 42
(already uploaded).

Rex Conn
JP Software
 
PowerShell is redefining the console color palette for its window. Take
Command will detect this when launching an app in a tab window, but it was
not detecting it when you attach a tab. I've added that to build 42
(already uploaded).

Rex Conn
JP Software
I downloaded and installed build 42, and the problem still persists. PowerShell's white on blue turns into gray on magenta.
 
> ---Quote (Originally by rconn)---
> PowerShell is redefining the console color palette for its window. Take
> Command will detect this when launching an app in a tab window, but it
> was
> not detecting it when you attach a tab. I've added that to build 42
> (already uploaded).
> ---End Quote---
> I downloaded and installed build 42, and the problem still persists.
> PowerShell's white on blue turns into gray on magenta.
>
Not reproducible here with build 42 (either 32 or 64 bit), in either Windows
2008 or Windows 7.

Anybody else able to reproduce this with build 42?

Rex Conn
JP Software
 
Attaching PowerShell changes its colors and makes it hard to read

Does this require Windows 2008 / Windows 7? I can't reproduce the problem
under XP.

On Tue, Mar 9, 2010 at 9:22 AM, cwc <> wrote:


> I'm a newbie to Take Command, and I'm still learning my way around.
>
> I opened a PowerShell window outside of Take Command, then attached it to
> TC inside a tab. The default PowerShell colors of white on blue were turned
> into some shade of gray on magenta, which is very difficult to read.
>
> Is there a way to keep the original colors when I attach an independently
> launched console window, PowerShell or otherwise?
>
>
>
>
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
Attaching PowerShell changes its colors and makes it hard to read

On Wed, Mar 10, 2010 at 8:03 AM, Jim Cook <[email protected]> wrote:


> Does this require Windows 2008 / Windows 7? I can't reproduce the problem
> under XP.
>

I meant to add, using build 41 I can't reproduce the problem in the first
place, so it seems pointless to try 42 until I can see a difference happen.
How do I reproduce the problem in 41?



>
> On Tue, Mar 9, 2010 at 9:22 AM, cwc <> wrote:
>
>> I'm a newbie to Take Command, and I'm still learning my way around.
>>
>> I opened a PowerShell window outside of Take Command, then attached it to
>> TC inside a tab. The default PowerShell colors of white on blue were turned
>> into some shade of gray on magenta, which is very difficult to read.
>>
>> Is there a way to keep the original colors when I attach an independently
>> launched console window, PowerShell or otherwise?
>>
>>
>>
>>
>>
>
>
>
> --
> Jim Cook
> 2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Monday.
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
> I downloaded and installed build 42, and the problem still persists.
> PowerShell's white on blue turns into gray on magenta.

First, doublecheck to make *sure* you're running TCMD build 42 (Help/About).

If you're definitely running 11.0.42, what version of Windows are you
running, and are you using the 32 or 64 bit version of Windows, and the 32
or 64 bit version of Take Command?

Rex Conn
JP Software
 
Attaching PowerShell changes its colors and makes it hard to read

> Does this require Windows 2008 / Windows 7? I can't reproduce the
> problem under XP.

Reading the remapped console color palette is only supported in Vista / 2008
/ 7.

In XP, Take Command will read the console color palette from the registry
(HKCU\Console\ColorTable).

Rex Conn
JP Software
 
Attaching PowerShell changes its colors and makes it hard to read

I have a Win7 box on my test bench just now. If somebody will give me
directions on how to reproduce the b41 problem, I'll test b41 & b42.

On Wed, Mar 10, 2010 at 9:59 AM, rconn <> wrote:


> ---Quote---
> > Does this require Windows 2008 / Windows 7? I can't reproduce the
> > problem under XP.
> ---End Quote---
> Reading the remapped console color palette is only supported in Vista /
> 2008
> / 7.
>
> In XP, Take Command will read the console color palette from the registry
> (HKCU\Console\ColorTable).
>
> Rex Conn
> JP Software
>
>
>
>
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
Here's what I'm running, as pasted in from the TCC signon:
TCC 11.00.42 Windows XP [Version 5.1.2600]

My version of Windows is 32-Bit.

First, doublecheck to make *sure* you're running TCMD build 42 (Help/About).

If you're definitely running 11.0.42, what version of Windows are you
running, and are you using the 32 or 64 bit version of Windows, and the 32
or 64 bit version of Take Command?

Rex Conn
JP Software
 
Re: Attaching PowerShell changes its colors and makes it hard to read

In my registry, under HKCU/Console:

ColorTable05 has the value 0x00800080 — Purple.
ColorTable06 has the value 0x00008080 — Olive.

On my system, these are the respective background and text colors that a PowerShell window takes on when it is attached.

I don't remember ever setting either of these colors for any console window.

Reading the remapped console color palette is only supported in Vista / 2008
/ 7.

In XP, Take Command will read the console color palette from the registry
(HKCU\Console\ColorTable).

Rex Conn
JP Software

I'm running Take Command 11.00.42 on Windows XP [Version 5.1.2600], as pasted in from the TCC signon.
 
Re: Attaching PowerShell changes its colors and makes it hard to read

> In my registry, under HKCU/Console:
>
> ColorTable05 has the value 0x00800080 - Purple.
> ColorTable06 has the value 0x00008080 - Olive.
>
> On my system, these are the respective background and text colors that
> a PowerShell window takes on when it is attached.

OK, there are two problems here.

First, XP does not support the Windows API that allows Take Command to
automatically mimic the colors of every attached console. No way around
that without updating to a less ancient version of Windows.

Second, although you have a custom color table, it's set to the default
values (5 = Magenta, 6 = Yellow), so Take Command is using that when
attaching the console. If you change those two values to 0x562401 and
0xf0edee respectively, you'll get the colors that PowerShell is using.
(This also means you won't be able to display the (non-bright) magenta or
yellow in your console windows, but that may not be a big loss for you.)

Rex Conn
JP Software
 
Re: Attaching PowerShell changes its colors and makes it hard to read

That's a reasonable workaround until I can get onto Windows 7 — Thanks, Rex, and also Jim for your efforts in trying to reproduce the problem.

OK, there are two problems here.

First, XP does not support the Windows API that allows Take Command to
automatically mimic the colors of every attached console. No way around
that without updating to a less ancient version of Windows.

Second, although you have a custom color table, it's set to the default
values (5 = Magenta, 6 = Yellow), so Take Command is using that when
attaching the console. If you change those two values to 0x562401 and
0xf0edee respectively, you'll get the colors that PowerShell is using.
(This also means you won't be able to display the (non-bright) magenta or
yellow in your console windows, but that may not be a big loss for you.)

Rex Conn
JP Software
 
I know this thread is old as dirt, but this issue is incredibly irritating. I can't believe noone else is complaining about it. I tried a trial version of the latest released version and the issue persists. I can repro by launching powershell, then just running tcc.exe from within powershell. This is particularly problematic when tcc is handling .bat files.

Windows 10 x64 build 1607
 
I know this thread is old as dirt, but this issue is incredibly irritating. I can't believe noone else is complaining about it. I tried a trial version of the latest released version and the issue persists. I can repro by launching powershell, then just running tcc.exe from within powershell. This is particularly problematic when tcc is handling .bat files.

Windows 10 x64 build 1607

This is actually a PS bug, not a TCC bug. However, since Microsoft is unlikely to provide a timely fix, I can probably hack something to determine whether ps.exe is the parent process and if so overwrite the incorrect registry values.
 

Similar threads

Back
Top