DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: batch file question re cmd + color  (Read 10,863 times)

222fbj

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 53
batch file question re cmd + color
« on: April 15, 2008, 01:31 PM »
For anyone still using batch files...
I customized the colors/font of my cmd window (on XP) by clicking the titlebar and changing Properties>Colors.
When I use my right click menu to 'open command prompt here" I get the colors I want.
I also have a batch file that opens a window with cmd /k but the colors default to black/white.
I read the color /? and cmd /? entries but did not figure out the solution - what "cmd" do I use in my batch file to open a window with the same colors/font as I get with "open command prompt here"?

thanks

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • Cody Award
    • Official Forum Clown
    • rotten turkey sandwich - Rotten Turkey Sandwich
Re: batch file question re cmd + color
« Reply #1 on: April 15, 2008, 02:26 PM »
From your batch file try

cmd /T:30

(from a command prompt see color /?)
Chris

AbteriX

  • Member #520
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,150
Re: batch file question re cmd + color
« Reply #2 on: April 15, 2008, 06:08 PM »
Thank you mates  :Thmbsup:

I just want look out for this feature this day (for my new "RunAsAdmin.cmd")

"RunAsAdmin.cmd"
@Echo off && Title Launch console as ADMIN && COLOR 1F
RUNAS /USER:Administrator "cmd /T:4F /K TITLE ADMIN RIGHTS" && "/K /F:ON /E:ON"
Greetings, Stefan.
« Last Edit: April 15, 2008, 06:41 PM by AbteriX »

Original address: https://www.donationcoder.com/forum/index.php?topic=13064.0