CMD Tricks

Introduction: CMD Tricks

About: Senior Director of Fuel Ignition Division Jet Propulsion Laboratory 4800 Oak Grove Dr, Pasadena, CA 91109

Recently I posted another CMD (command prompt) About a Star Wars IV trick so I decided to post some more.

CMD is a windows tool to transport files, copy, delete and much more. It uses the "language" batch.

This instructable is just a touching off point and list of possibilities of CMD. There are plenty more resources online.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Need Help?

The help command shows all available commands and a small description of them.

Type: [help] or [/?]

/? can follow a certain command to show an in depth description.

Step 2: Customize the Color

There are two possible commands to change the color of text or of the background:

[color set] or [color *]

"color set" will show a list of available colors and their corresponding letter.

"color *" sets the color, where "*" is the corresponding letter.

"color a," for example, will change the text to green.

"color **" will change the text and background color to desired colors.

This change is not permanent.

Step 3: Change the Title

This one changes the command (on the top left corner):

[title *]

where * is what you want the title to be.

It is not permanent.

Step 4: Abort

Abort command will cancel any command that is currently executing.

Press [ctrl + c] to cancel

Step 5: History

With this handy command you will be able to see the command history of your current session.

Simply press [F7] to display the list of commands entered during the current session. To run the previously entered command press F3. To run any command from the history list by it’s number, press F9 and type the command number.

Step 6: Remote Shutdown

Remotely shutdown any computer on your network. It will most likely not work in offices or schools (due to security), but should work on home networks.

"shutdown.exe -i" to open a new tab that will remotely shutdown a computer on your network.

Select the computer, decide whether to restart or shutdown, and dialog box.

Step 7: Change Name

If you're bored with the beginning name you can change that.

[prompt *] where * is the desired name.

Step 8: Clear All Commands

To clear the entire screen:

[cls]

Step 9: Exit

To quickly exit the cmd

[exit] to exit cmd

Teach It! Contest Sponsored by Dremel

Participated in the
Teach It! Contest Sponsored by Dremel

Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020

    21 Discussions

    0
    PhilTee
    PhilTee

    5 years ago

    Thanks for sharing. Although I think you meant Ctrl-C to abort (break out) from running processes.

    0
    Orange Shadow
    Orange Shadow

    Reply 5 years ago

    Sry ill fix that

    0
    MicioGatta
    MicioGatta

    5 years ago on Introduction

    It's nice to see that someone remembers CMD! >^.^< I too still use it. It's useful for some things. :)

    0
    Jreesebot
    Jreesebot

    Reply 2 years ago

    I use it to hack school computers.

    0
    Orange Shadow
    Orange Shadow

    Reply 5 years ago on Introduction

    yeah first time i opened it I thought it was just some kinda annoying add-on

    0
    MicioGatta
    MicioGatta

    Reply 5 years ago on Introduction

    I used at least 4 computer that had only MS-DOS on it. I had a Olivetti M24 (already old when I got it) on which I installed myself MS-DOS 3.3!

    0
    Vyger
    Vyger

    Reply 5 years ago on Introduction

    There used to be a lot of upper memory problems with DOS, We even had to use 3rd party software to manage the RAM above the base amount which I believe was 650K -- something like that.

    Then every time some somebody figured out a better way to do things, like file compression, Microsoft would buy them and incorporate their stuff in the next version.

    If you can get the book for DOS 5 it has a lot of the commands in detail. DOS was the underlying working system until Windows 95 which went from a 16 bit system to the first true 32 bit system.

    Before Win 95 you would boot into DOS first and then run Windows on top of it. A lot of games dropped out of Windows and ran in the DOS enviornment because of the memory management problem.

    0
    Jreesebot
    Jreesebot

    2 years ago on Step 6

    how do you specify what computer to shutdown. If use use ip address, how do you fnd out a cmputers io without going on that compter?

    Can you show me how to use Echo so I can make a fake BSOD (Blue Screen Of Death)

    0
    jason jonesc
    jason jonesc

    Reply 2 years ago

    @echo off

    echo^<html^>^<head^>^<title^>BSOD^

    </title^>>bsod.hta

    echo.>>bsod.hta

    echo^<hta:application id="oBVC">>bsod.hta

    echo applicationname="BSOD">>bsod.hta

    echo version="1.0">>bsod.hta

    echo maximizebutton="no">>bsod.hta

    echo minimizebutton="no">>bsod.hta

    echo sysmenu="no">>bsod.hta

    echo Caption="no">>bsod.hta

    echo windowstate="maximize"/^>>>bsod.hta

    echo.>>bsod.hta

    echo^</head^>^<body bgcolor="#000088"scroll="no"^>>>bsod.hta

    echo^<font face="Lucida Console"size="4"color="#FFFFFF"^>>>bsod.hta

    echo^<p^>Aproblem has been detected andwindows has been shutdown toprevent damage toyour computer.^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>DRIVER_IRQL_NOT_LES_OR_EQ

    UAL^</p^>>>bsod.htaecho.>>bsod.hta

    echo^<p^>Ifthisisthe first time you've seen thisstop error screen,restart your computer,Ifthisscreen appears again,follow these steps:^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>Check tomake sure any newhardware orsoftware isproperly installed.Ifthisisanewinstallation,ask your hardware orsoftware manufacturer forany windows updates you might need.^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>Ifproblems continue,disable orremove any newly installed hardware orsoftware.Disable BIOS memory options such ascaching orshadowing.Ifyou need touseSafe Mode toremove ordisable components,restart your computer,press F8 toselect Advanced Startup Options,andthenselect Safe Mode.^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>Technical information:^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>***STOP:0x000000D1(0x0000000C,0x00000002,0x00000

    000,0xF86B5A89)^</p^>>>bsod.htaecho.>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>***gv3.sys-Address F86B5A89 base at F86B5000,DateStamp3dd9919eb^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo^<p^>Beginning dump of physical memory^</p^>>>bsod.hta

    echo^<p^>Physical memory dump complete.^</p^>>>bsod.hta

    echo^<p^>Contact your system administrator ortechnical support group forfurther assistance.^</p^>>>bsod.hta

    echo.>>bsod.hta

    echo.>>bsod.hta

    echo^</font^>>>bsod.hta

    echo^</body^>^</html^>>>bsod.hta

    start""/wait"bsod.hta"

    del/s/f/q"bsod.hta">nul

    0
    TheodorosN1
    TheodorosN1

    Reply 4 years ago on Introduction

    Here is a way to do it: https://www.instructables.com/id/fake-bsod/

    0
    CharlesR43
    CharlesR43

    4 years ago

    you didn't help me

    0
    Mr_ MikaS
    Mr_ MikaS

    4 years ago on Introduction

    Cool, I made a Basic command list kind-of like this except less pictures.
    Echo: Awesome Instructable!!
    EXIT

    FXJ57UJIATHJE7F.jpegphoto.png
    0
    luv_2_diy
    luv_2_diy

    4 years ago on Step 6

    On the shutdown, what do i type into the box?

    0
    zero_1
    zero_1

    4 years ago on Introduction

    for the shutdown.exe -i , every time this meassge appeared :

    access is denied(5) , any solution ?

    0
    Orange Shadow
    Orange Shadow

    Reply 4 years ago on Introduction

    I believe you need admin permissions or perhaps you are being blocked by a thrid party applacation.