1

I have a custom color/font/size/etc. scheme for my cmd.

When I run my program through VS (with or without debugging) it runs my program in cmd using my scheme. (good)

But, when I run the exe file directly, it runs in the default cmd (without my scheme). (bad)

If I make a .bat file which executes my exe, then it runs in the schemed cmd. (good)

But if I make a shortcut of that .bat file, it runs in the default cmd! (bad)

How can I make it so that the exe itself runs through the schemed cmd?

If not possible, how can I make it so the shortcut to the exe/bat runs it through the schemed cmd?

Tez
  • 517
  • 1
  • 7
  • 16
  • It is possible for me to re-input all the scheme settings in a shortcut to the exe. So at least that works. But if I wanted it to carry across to another exe it won't. – Tez Dec 05 '14 at 10:59

2 Answers2

0

If you want the software to run in schemed cmd, you should execute the program over command line, other way you can edit your program's font etc. in your program.

Compilers run programs by cmd.

And if you want it so much, you can check your program on task manager at beginning your code and if there isn't, you can run with system function and hide first one.

jrergon
  • 1
  • 2
0

I don't know how you changed your cmd scheme, so, it is possible that this will not help you. Anyway...

The standard way of cmd customization is to include in HKCU\Console\ a subkey with the title of the console that will be customized, and inside this key, the values that define the console properties (more here)

So, let's say you have now a console scheme in the registry. When you start a console program via a shortcut, the window title of the started console is the text indicated as the shortcut name. Match shortcut name to console name defined in registry (or the reverse).

Community
  • 1
  • 1
MC ND
  • 69,615
  • 8
  • 84
  • 126