Code a CustomCmd Script for Windows Command Prompt

Do you use CMD a lot? I do! But a ton of people - including me - think it is much too boring. Today I will be coding a script that will allow us to customize CMD just enough to keep it fun. Let's get started!

CODE DOWNLOAD AT BOTTOM OF ARTICLE

Step 1: Start Notepad++ (or Notepad)

First and foremost we need to start Notepad++. I use it to code everything! If you don't have it just open up Notepad. I would 100% recommend installing it.

Step 2: Code the Menu

Of course we will need to add @echo off and then I will just make a simple menu layout:

@echo off

REM By: Aidan Biggs REM AKA AT Vloggers REM REM Please do not claim this as your own. REM REM If you remove this it means you break the Code of Use found here: REM https://at-vloggers.weebly.com/code-of-use.html

title Custom CMD cls echo =============== echo By: Aidan Biggs echo AKA AT Vloggers echo. echo CustomCMD echo =============== echo. echo 1. REVERT TO NORMAL echo 2. CUSTOM echo 3. EXIT set /p rce= if %rce% == 1 goto revert if %rce% == 2 goto custom exit

Step 3: Add the Custom Tool

Next we will add the menu to set the custom parts of CMD. We also need to add the code that will update the registry and add our custom parts. We can also add an option to update one and not the other.

:custom

cls
echo What do you want the command bar, (look below) to say? echo type NONE to stay as is echo. echo Your-text-will-be-here^> echo. set /p cmdbar= echo. echo What do you want the window title to be? echo type NONE to stay as is echo. set /p cmdtitle=

echo Windows Registry Editor Version 5.00 >customCmd.reg echo. >>customCmd.reg echo [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] >>customCmd.reg if "%cmdbar%" == "NONE" ( echo "Autorun"="title %cmdtitle%" >>customCmd.reg ) else ( echo "Autorun"="prompt %cmdbar%$G && title %cmdtitle%" >>customCmd.reg ) if "%cmdtitle%" == "NONE" ( echo "Autorun"="prompt %cmdbar%$G" >>customCmd.reg ) else ( echo "Autorun"="prompt %cmdbar%$G && title %cmdtitle%" >>customCmd.reg ) echo. >>customCmd.reg echo. >>customCmd.reg cls regedit /S %cd%\customCmd.reg del customCmd.reg cls echo DONE pause >nul exit

Step 4: Add the Revert Tool

Now that we have the actual custom part, we could leave it as is. The only problem would be that we would have no way to revert the changes. That is what this code is for:

:revert
cls echo Windows Registry Editor Version 5.00 >customCmd.reg echo. >>customCmd.reg echo [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] >>customCmd.reg echo "Autorun"=- >>customCmd.reg echo. >>customCmd.reg echo. >>customCmd.reg cls regedit /S %cd%\customCmd.reg del customCmd.reg cls echo DONE pause >nul exit

Step 5: (OPTIONAL) Convert File to .exe

Go to Google and look for Advanced BAT to EXE. Download one and convert the file.

Step 6: DOWNLOADS

Batch (.bat) file and Executable (.exe) file:

Share

    Recommendations

    • Arduino Contest 2019

      Arduino Contest 2019
    • Tape Contest

      Tape Contest
    • Trash to Treasure

      Trash to Treasure

    3 Discussions

    0
    None
    at_vloggersYT

    12 days ago

    By the way, I didn't upload the .exe file because, when I tried, I got an internal server error

    HAVE FUN AND GIVE PROPER CREDIT: Aidan Biggs

    2 replies