Announcement

Collapse
No announcement yet.

PROMPT customisation, CMD processor

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PROMPT customisation, CMD processor

    Hi folks

    I wondered if anyone knew of a replacement for ANSI.SYS which works in the modern "CMD" command processor. I have no problem getting it to work in COMMAND.COM, but BOY is that environment stilted!!! I'm trying to get a PROMPT string which gives me different colours and so on; but this appears impossible in CMD so far... so if someone knows of either (a) a suitable replacement environment for CMD, or (b) a suitable replacement for ANSI.SYS that actually works in CMD, please let me know.

    Thanks


    Tom
    For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

    Anything you say will be misquoted and used against you

  • #2
    Re: PROMPT customisation, CMD processor

    You're not talking about opening the Command window and editing its properties, are you? You want to change the colors of the screen depending on the prompt? I'm not sure I get what you're up to ..

    Sorin Solomon


    In order to succeed, your desire for success should be greater than your fear of failure.
    -

    Comment


    • #3
      Re: PROMPT customisation, CMD processor

      See my "CODE" listing below and I think you'll get my idea...

      I know how to change the defaults and screen colours etc - but they all change at once. What I want is:

      Code:
      dir
       Volume in drive C has no label.
       Volume Serial Number is 2061-115C
      
       Directory of C:\Commands
      
      10/10/2008  10:06    <DIR>          .
      10/10/2008  10:06    <DIR>          ..
      02/10/2008  13:18               209 custom.cmd
      19/08/2008  11:39             1,731 dnsfwd.cmd
      19/08/2008  12:08                58 edit.cmd
      06/10/2008  11:12               171 enableD.cmd
      06/10/2008  11:13               175 enableu.cmd
      20/08/2008  12:30               287 helpcmd.cmd
      08/10/2008  10:30            52,628 hostlist.txt
      08/10/2008  10:20             1,159 iplist.txt
      06/10/2008  10:08                42 kidsd.txt
      06/10/2008  10:07                32 kidsu.txt
      08/10/2008  10:28               132 pinglist.cmd
      20/06/2008  14:04               473 reboot.cmd
      30/09/2008  14:01               272 Secondary KID Groups.txt
                    13 File(s)         57,369 bytes
                     2 Dir(s)  12,617,617,408 bytes free
      
      ----------------------------------------------------------------
      C:\Commands   >15:02:32.65
      READY.
      _


      Tom
      For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

      Anything you say will be misquoted and used against you

      Comment


      • #4
        Re: PROMPT customisation, CMD processor

        you would normally get this sort of effect by putting this in a command file which is executed by the CMD processor when it starts:

        Code:
        PROMPT $E[1,36m$P$S$S$S$G$T$_$_READY.$_$E[0m
        The parts I've highlighted in blue are the parts that in COMMAND.COM with ANSI.SYS loaded will change the colours of prompt text; however in CMD.EXE it doesn't work. I need a replacement to ANSI.SYS that works in CMD.EXE in XP or better.


        Tom
        For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

        Anything you say will be misquoted and used against you

        Comment


        • #5
          Re: PROMPT customisation, CMD processor

          Never played with this puppy... I can tell I'm pretty happy that my encounters with CMD.EXE are rare
          I'll try to look around though...

          Sorin Solomon


          In order to succeed, your desire for success should be greater than your fear of failure.
          -

          Comment


          • #6
            Re: PROMPT customisation, CMD processor

            Originally posted by sorinso View Post
            Never played with this puppy... I can tell I'm pretty happy that my encounters with CMD.EXE are rare
            I'll try to look around though...
            Jeez pal you must be young... Wait until you're administering Server Core!!! You will want a fancy command environment then, I can tell you LOL.

            Seriously though, having a good prompt string breaks up the screen and makes it easier to read.


            Tom
            For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

            Anything you say will be misquoted and used against you

            Comment


            • #7
              Re: PROMPT customisation, CMD processor


              Originally posted by Stonelaughter View Post
              Jeez pal you must be young...
              On the contrary... I meant that I did not played with customizing the COMMAND environment, especially not with scripts... I ate CLIs enough since I started my IT journey back in late 80s... My first PC was an XT with green-and-black CGA screen. Before that I had a Spectrum Sinclair with only 64KB RAM, out of it 16KB was the BASIC interpreter.
              Originally posted by Stonelaughter View Post
              Wait until you're administering Server Core!!! You will want a fancy command environment then, I can tell you LOL.
              I saw that already. CLI itself does not bother me, it's the new commands... I'm confident that in the moment I'll start working with it, it will look much less threatening.

              Originally posted by Stonelaughter View Post
              Seriously though, having a good prompt string breaks up the screen and makes it easier to read.
              Absolutely. An environment in which different objects are colored differently (like in Linux' KDE) it would be nice...
              Have a gr8 weekend!

              Sorin Solomon


              In order to succeed, your desire for success should be greater than your fear of failure.
              -

              Comment


              • #8
                Re: PROMPT customisation, CMD processor

                Sorin, are you telling us you never messed with someones Autoexec.bat and changed their prompt to something, um..........funny (to you) perhaps? Never changed the font to the same as the background colour? Made the prompt that long it wrapped round the Command window?

                But of course it must be the Vulcan (lack of) humor.
                1 1 was a racehorse.
                2 2 was 1 2.
                1 1 1 1 race 1 day,
                2 2 1 1 2

                Comment


                • #9
                  Re: PROMPT customisation, CMD processor

                  Originally posted by biggles77 View Post
                  Sorin, are you telling us you never messed with someones Autoexec.bat
                  What a nerd I was, wasn't I? I barely dared to use BlueScreen on the guy next to me on his BD
                  Stonelaughter: I found an article that suggests adding DEVICE=ANSI.SYS to CONFIG.NT. Have you tried it?

                  Sorin Solomon


                  In order to succeed, your desire for success should be greater than your fear of failure.
                  -

                  Comment


                  • #10
                    Re: PROMPT customisation, CMD processor

                    Yes - that affects COMMAND.COM but not CMD.EXE

                    To save your pain I also found ANSI.COM which doesn't work on CMD.EXE either.


                    Tom
                    For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

                    Anything you say will be misquoted and used against you

                    Comment


                    • #11
                      Re: PROMPT customisation, CMD processor

                      Is this what yer after???

                      http://www.petri.com/customize_comma..._2000_2003.htm

                      Comment


                      • #12
                        Re: PROMPT customisation, CMD processor

                        Originally posted by wullieb1 View Post
                        Nope, that was the obvious...
                        There's an option of using escape sequences with ANSI.SYS to add (among others) colors to the prompt. But ANSI.SYS works only for COMMAND.COM. not for CMD.EXE. This is what Tom's after ...

                        Sorin Solomon


                        In order to succeed, your desire for success should be greater than your fear of failure.
                        -

                        Comment


                        • #13
                          Re: PROMPT customisation, CMD processor

                          This might be worth a try?
                          http://sourceforge.net/projects/console/


                          The open source project Console is a cmd.exe replacement and terminal enhancement. Console features; multiple tabs, text editor-like text selection, different background types, alpha and color-key transparency, configurable font, different window styles.
                          From http://mediakey.dk/~cc/windows-conso...e-replacement/
                          Tom Jones
                          MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
                          PhD, MSc, FIAP, MIITT
                          IT Trainer / Consultant
                          Ossian Ltd
                          Scotland

                          ** Remember to give credit where credit is due and leave reputation points where appropriate **

                          Comment


                          • #14
                            Re: PROMPT customisation, CMD processor

                            Now THAT looks promising!!

                            Cheers!


                            Tom
                            For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

                            Anything you say will be misquoted and used against you

                            Comment


                            • #15
                              Re: PROMPT customisation, CMD processor

                              Originally posted by Stonelaughter View Post
                              Now THAT looks promising!!
                              The Brotherhood of Toms

                              Sorin Solomon


                              In order to succeed, your desire for success should be greater than your fear of failure.
                              -

                              Comment

                              Working...
                              X