Attaching PowerShell changes its colors and makes it hard to read

cwc

Mar 9, 2010
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?
 
May 20, 2008
603
0
Sammamish, WA
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
> 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
 

cwc

Mar 9, 2010
11
0
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
> ---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
 
May 20, 2008
603
0
Sammamish, WA
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.
 
May 20, 2008
603
0
Sammamish, WA
Attaching PowerShell changes its colors and makes it hard to read

On Wed, Mar 10, 2010 at 8:03 AM, Jim Cook <jimrcook@gmail.com> 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.
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
> 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
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
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
 
May 20, 2008
603
0
Sammamish, WA
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.
 

cwc

Mar 9, 2010
11
0
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
 

cwc

Mar 9, 2010
11
0
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
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
 

cwc

Mar 9, 2010
11
0
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
 

jjp

Sep 8, 2016
1
0
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
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
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
Thread starter Title Forum Replies Date
C TCMD: Problem attaching console Support 4
CWBillow TCC and TCMD in Powershell Support 6
Joe Caverly PowerShell=No Support 1
EDerH Powershell call from script Support 24
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
Joe Caverly PowerShell Core Support 1
CWBillow PowerShell tab as Admin Support 2
CWBillow TCMD PowerShell Tab elevated Support 6
CWBillow Take Command tab as PowerShell Support 3
vefatica Powershell ... insert vs overstrike Support 2
CWBillow Powershell tab in TCMD? Support 2
Joe Caverly Fixed Displaying Profiles from TCC vs. PowerShell Support 2
Joe Caverly How to use Powershell Profile with PSHELL Support 14
F Powershell call fails with "Scripting Integrator 2016 (PowerShell)" license error Support 9
CWBillow PowerShell Tabs in TCMD Support 11
I v16 Spawning a PowerShell tab Support 3
vefatica "which" in PowerShell invokes TCC? Support 3
B Powershell scripts not opening in notepad-TC main suspect Support 2
electrotype Powershell in Take Command - Customizing colors? Support 4
Jay Sage Changes to Keyboard Settings Not Being Saved Support 10
R Changes to BDEBUGGER menu item keyboard shortcuts in v25 Support 2
Joe Caverly 7zip changes file time Support 7
RChrismon How to? Changes to Options Don't Save Support 8
D v20 code page behavior changes Support 2
P Why won't my changes to Options take? Support 5
Alpengreis WAD Each start/close of TCMD changes my Explorer setting Support 7
Charles Dye Re: Feedback Forum Changes Support 9
rconn News Feedback Forum Changes Support 0
David McClelland How to? Path Changes Support 4
vefatica WAD Escaping changes case to lower? Support 12
Joe Caverly New Tab In TCMD Changes TCC Window Size Support 1
BobK "do you want to allow the following program to make changes to this computer" Support 3
S WAD BDEBUGGER command changes window title to "TCC Prompt" Support 4
D Automatic directory changes don't work at all Support 4
S WAD Invoking BDEBUGGER changes window title to "TCC Prompt" Support 7
D Copy to clip changes character Support 24
Alexander Fixed No changes to the descript.ion file Support 6
Charles Dye Changes in 13.01 Support 1
Joe Caverly Saving SMTP Changes in TCC13 Support 5
fpefpe Color changes Support 1
Y 12.1 changes Support 1
krischik Button changes not saved Support 5
J Disable Automatic Directory Changes? Support 6

Similar threads