How to set up smartphones and PCs. Informational portal

Command line window. Program line

OS rollback allows you to restore Windows to normal operation if it is damaged as a result of exposure to malicious software, installation of low-quality drivers, software updates, unintentional user actions, and in other cases. To start System Restore, just go to the Start menu and activate the corresponding application in the System Tools section.

If Windows does not start, then the command line comes to the rescue. With its help, you can reanimate the operating system loader, thereby returning it to operability and allowing the user to perform a thorough search for the cause of the malfunction.

How to enter command mode

There are several ways to start the command prompt in Windows 7:

  • through the standard menu;
  • using safe mode;
  • via a boot disk.

The first method is relevant when the operating system is loaded in stationary mode. In this case, open the Run tab through the Start menu and enter the cmd command.

To enable safe mode, you need to press the F8 function key during the computer restart process and activate the corresponding line in the boot options selection window. Further actions will be the same as in the first case.

If the damage to the system is so serious that Safe Mode does not turn on, a bootable disk or USB flash drive with Windows 7 OS comes to the rescue. Moreover, its assembly must match the one installed on the computer.

To run the command line through the boot disk, you must:

Reanimating Windows OS using the rstrui.exe command

The rstrui.exe command launches the familiar graphical shell of the recovery procedure. However, to use it, checkpoints must be enabled on the computer. Such points are created automatically for the Windows system partition. For other volumes, they must be manually activated.

System recovery via rstrui.exe is performed as follows:


Using the Chkdsk command

The correct syntax for the Chkdsk utility via the command line is shown in the image.

Restoring the bootloader using Bootrec.exe

This utility allows you to restore a damaged Windows 7 bootloader and, accordingly, start the OS in normal mode to find the cause of the malfunction. If Bootrec is entered on the command line, you will see a list with all the keys working with this command, as well as their brief description.

Let's take a closer look at each key:


Using the BCDboot.exe command

If you cannot restore the Windows 7 system to work using the commands described above, you can try using the BCDboot.exe utility. This program also allows you to reanimate a damaged boot sector or create a new one.

The Command Prompt is one of the most flexible and useful Windows tools. Formally, the cmd.exe application is inside the Windows folder and is a command line. Unfortunately, most users don't even know how to start the command line. In this article, we will try to fix a similar defect.

Windows XP

The method for launching the command line varies greatly depending on the version of the Windows operating system. In Windows XP, you can run this application using the following methods:

  1. In the first option, you can simply go to the start menu, select the "all programs" section, go to the "standard" category and find the "command line" application there.
  2. You can also choose a faster method and just open the "start" menu and find the "run" item there. The "Run" menu item will open a command window in which you should enter cmd.exe.

Windows 7

But Windows XP has long been considered an outdated version of the system. Nowadays, the most relevant operating system is Windows 7. And if the first method of launching the command line described above can still be used in Windows 7, then method # 2 will be completely useless. The main reason for this is that by default there is no Run menu item in the Start menu. It can be turned on without any problems by going to the properties of the "start" menu and there selecting the appropriate item. Also in Windows 7, you can quickly search the Start menu. In order to use this function, it is enough to open the menu and just start entering the name of the required application (in our case, cmd.exe).

In addition to the above method of launching the command line, there is another one that is completely universal. It works both in Windows XP and Windows 7. Its essence is simple: you press the key combination win + r, after this action the previously mentioned "Run" window opens, enter cmd.exe in it and press Enter. As for me - it couldn't be easier.

How to run any application through the command line

Earlier we mentioned the fact that the command line is a versatile tool in the hands of the user. Quite often, developers of various applications implement support for commands and parameters that can be activated or specified using the command line. Let's consider the process of launching the program using a real example.

Let's say you need to run the Testprogram.exe program, which is located in the C: \ Program Files \ Test \ directory. First, we need to go to the appropriate directory (by default, the command line opens the user's folder). To do this, run the command cd c: \ Program Files \ Test. After switching to the desired directory, you can freely run the program with the appropriate parameters. For example, let's run our program with the print to document option:

C: \ Program Files \ Test> Testpogram.exe / print c \ test.txt

As a result of this command, the Testprogram.exe program will print to the document test.txt, which is located on the local drive C. In order to find out the commands supported by any program, read the help from the developers. For a list of standard cmd.exe commands, you can use the "help" command.

If you plan to regularly work in the command line application, then I recommend that you customize this environment to suit your needs. To start configuring, click on the upper left corner of the window and select the "Properties" item. In the window that opens, you can change a lot of different parameters: buffer size, quick paste and selection, window position, window size, etc.

The command line is a tool that can significantly speed up the process of working at a personal computer. Having studied it once, you will save your time hundreds of times in the future.

Ever since the computer has become an integral part of the life of modern society, we have become accustomed to working in a visual graphical interface. In simple terms, it is - clicking with the mouse on pictures, dragging and dropping them, etc. But at the dawn of computer technology, everything was different. Then the commands to the machine were given exclusively in text mode. Even now, programmers and so-called advanced users can easily communicate with their computer using text commands.

Sometimes the ability to use this mode can greatly simplify life, and in some cases it becomes simply necessary. Therefore, in this article, we will discuss what the Command Prompt is in Windows 7, how to open that prompt, and why you might need it.

Human to computer translator

In order for the computer to understand user requests, the operating system has a special command shell, where the Windows 7 command line acts as a translator. For English-speaking people in this sense, of course, life is easier, since the commands are written in the purest English. Well, the rest will have to learn a couple of dozen foreign words.

in Windows 7. How to open this tool

First, let's figure out how to start the input environment we need. There are several ways to open Windows 7 Command Prompt.

To use the first method, you will have to remember the simplest command - "cmd". This is not difficult to do. These letters are a computer abbreviation for the English word command, which is very consonant with the Russian "command". Applying the simplest examples of mnemonics, we get the letters we need ( TO O M an D naya).

Click on the "Start" button (Windows icon), which is located in the lower left corner of your screen. In the window that opens, in the line "Find programs and files" (the bottom line) enter the command "cmd". The required icon will appear in the appeared list of programs. By clicking on it with the left mouse button, you can start the Windows 7 command line.

The next way to invoke the command line also starts with the Start button. But this time, you can simply click on the "All programs" line in the list and select the "Standard" folder. By clicking on a folder, you get a range of programs. One of them will be the "Command Line".

Command Prompt in Windows 7. How to open using the standard keyboard shortcut

You can also achieve the desired result using the "Win" + "R" key combination. (The "Win" key is located on the keyboard in the bottom row, third from the left, with the Windows logo). By clicking this combination, you will open a special window "Run". In the proposed field, you need to enter the command "cmd" already familiar to you and press the "Enter" key.

What you might need the command line for

Let's say you're using a free trial period for the Windows 7 operating system. It’s coming to an end, but you haven’t fully figured out whether to migrate to a permanent basis. This is where the knowledge of working with the command line comes in handy.

Microsoft has provided an absolutely legal opportunity for an additional period (up to 120 days) to activate Windows 7. The command line in this case will be needed to enter the code. This command can be set only on behalf of the administrator. This precaution is by no means superfluous. After all, many specific changes in the operation of a computer can be introduced using the "Command Line" program. must be clearly aware of what his actions will lead to.

To log in with administrator rights, by calling the program in one of the previously described ways, right-click on it and in the context menu that opens, select "Run as administrator" (at the very top of the list).

After that, in the window that opens, enter "slmgr.vbs / rearm" (there must be a space after the letters "vbs"). And confirm the command by pressing the "Enter" key. Restart your computer and check the trial version expiration date. It should be 30 days. This procedure can be repeated, but no more than three times. So in total, you get 120 days to research the capabilities of the operating system.

List of basic commands

The command line in Windows 7 will also help in performing many basic and specific functions. How to open the required directory or folder and perform the necessary operations with them, you will learn from the following list of commands. And while it is far from exhaustive, knowing this foundation can one day make your life great. To make it easier to understand, let's try to group the commands into small blocks.

Commands for working with individual files and folders

  • If you need to delete a file or a whole group of files, use the "del" command.
  • To copy information to another folder or directory, use the "copy" command.
  • To find a given text string in the current file (or group of files), type "find".
  • If you need to compare multiple files to find out the difference between them, use the literal combination "fc".
  • To move the specified files to another folder, type "move".
  • To create a new empty folder, just give the prompt "md".
  • If it is necessary to delete the folder along with all its contents, use “rd” irrevocably.
  • If you want to print text or graphic information from the specified file, type "print".
  • To completely replace the selected files, use the "replace" command.
  • To rename an individual file or folder, enter "ren".
  • To see a complete report of the graphical directory structure of a drive or folder, use the tree command.
  • Sometimes it is necessary to run an improved copying tool for files and even full directory trees. In this case, type "robocopy"
  • And for simple copying of files and directory trees, "xcopy" is used.
  • If you want to see the complete contents of the specified text files on your screen, issue the "type" command.

Command line management

A number of specific commands are used to directly control the command line itself. Thanks to them, you can afford to personalize to some extent the work with this program by changing some of its parameters.

  • To run a second additional copy of the command line, enter "cmd". It will open in the next window.
  • To completely clear the Command Prompt screen, issue the "cls" command.
  • If you want to change the prompt on this command line, enter "prompt".
  • To assign an original title to the window for the current session, use the "title" command.
  • The "color" command allows you to select and set an individual text color and background for the program interface.
  • The exit from the command line is always done with the "exit" command.

Features of working with the command line in Windows 8

In the Windows 7 operating system, launching the command line as an administrator is relatively easy. But in order to open this program in Windows 8, you need to know some news and subtleties of this shell.

Windows 8 does not have a Start menu. In order to call the panel we need, you need to right-click on any empty area of ​​the desktop. After this action, an additional panel will appear at the bottom of the screen, on which you will find the "All Applications" icon (lower right corner).

Open applications (by clicking on the icon with the left mouse button) and look in the list that appears for the icon with the inscription "Command line" (it will be located approximately in the central part of the panel). Click on this icon with the right mouse button (if you use the left key, then by default the command line will open on behalf of the current user) and in the additional that appears below, select the option "Run as administrator".

Timely assistant

While command line operations are by all accounts the privilege of power users, in fact, anyone can master the tool. And the built-in assistant will play an invaluable help in learning. It is called by a very easy-to-remember text command "Help".

Working with the command line, at any time you can specify the "Help" command - and the program will give you a complete list of its capabilities. In order to get more detailed information about any particular command you are interested in, just enter a query in the format "help + command name".

So don't be afraid to experiment and expand your horizons. Explore the capabilities of your own computer or laptop - and in the near future you can easily talk on an equal footing with those who have received a specialized education.

Another article in the series "how to do something in several ways", plus, this article, and others like it, which will be written later, will help me not to repeat myself in new lessons, but simply point you to links to them.

This article is written using the example of Windows 7 Ultimate. In other versions of Windows, some methods will not work or may differ.

Opening the command line through the "Run" window

This is one of the versatile ways to run the command line. It is fast, convenient and works, probably, in all possible versions of Windows.

1. Open the "Run" window. To do this, press the key combination + R.

2. In the "Open" field, enter " cmd»And press Enter or the OK button.

Launching the command line from the start menu

This method does not require nothing to enter from the keyboard, but you should have a Start menu.

1. Open the Start menu and navigate to the All Programs / Accessories / Command Prompt path.

Tip: In Windows 10, the Command Prompt has been moved to the System Tools - Windows folder.

Launch a command prompt using the search box on the Start menu

Another way when we need the Start menu.

1. Open the Start menu and type "command prompt" in the search box.

2. Select Command Prompt from the search results or press Enter.

Opening Command Prompt from Windows Explorer

This method is good in that you can open the command line immediately for the desired folder.

1. Press and hold the key and right-click on the desired folder in the explorer.

2. In the context menu that opens, select "Open command window".

Opening Command Prompt from Windows System Folder

One of the most unusual and at the same time simple way is to find and open the command line in the folder with the operating system.

1. Open Windows Explorer and follow the path below, or copy and paste it into the address field:

Hello, dear blog readers In my articles, I quite often mentioned such a concept as the command line. Although today this component in operating systems has lost its original meaning, the solution of certain tasks is not complete without the command line. Therefore, I bring to your attention an article about what is the command line and how to start the command line in Windows 7 and XP.

First, let's define what the command line is.

The command line is a text interface between the operating system and the user, in which commands are issued by entering commands (text strings) from the keyboard. The command line is also called the console.

Operating systems today tend to use a graphical or menu-driven interface more. The command line is used when the problem cannot be solved using the graphical interface or the solution of the problem will take more time.

Fig 1. Command line.

Using the command line has both advantages and disadvantages. The advantages include:

- calling commands by pressing a small number of keys;

- the command line allows you to manage programs that do not have a graphical interface;

- access to commands is almost instantaneous (since there is no need to open the graphical interface to run the required file).

The main disadvantage of the command line (which influenced the decline in popularity) is that the console interface is not user-friendly, since you need to learn the commands, or use a prompt every time.

How to run Command Prompt in Windows 7 and Windows XP

The console startup process is the same for the two operating systems. You must press the key combination "Win + R". The "Run" window will open in this window, write the command "cmd" and press "Enter". This will open Windows Command Prompt in normal account mode.

The command line executable is located at

C: WINDOWSsystem32

and is named cmd .exe.

To find out with a list of all available commands for the command line it is necessary to register the command “help” in the console and press “Enter”. Help appears listing the commands used.

Fig 2. List of all available commands for the command line.

Run Command Prompt as Administrator.

Since a non-administrator user has limited options when using the command line, sometimes the console needs to be run as administrator. To do this, open “Start”> “All Programs”> “Accessories” and right-click on “Command Prompt”.

Top related articles