Command line open drive. Basic command line commands

💖 Like it? Share the link with your friends

Rollback of the OS allows you to restore the normal operation of Windows if it is damaged as a result of a malicious program. software, installation of low-quality drivers, software updates, unintentional user actions and in other cases. To start System Restore, just enter 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 boot loader of the operating system, thereby returning it to working capacity and enabling the user to perform a thorough search for the cause of the malfunction.

How to enter command mode

You can start the command line in Windows 7 in several ways:

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

The first method is relevant in the case when the operating system is loaded into stationary mode. In this case, you need to 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 and activate the corresponding line in the boot options window. Further actions will be the same as in the first case.

If the damage to the system is so severe that the safe mode does not turn on, comes to the rescue boot disk or a USB flash drive with Windows 7 operating system. At the same time, its assembly must match the one installed on the computer.

For start command line through the boot disk you need:

Resuscitation of Windows OS using the rstrui.exe command

The rstrui.exe command launches the familiar graphical shell of the recovery procedure. However, to use it, you must have checkpoints enabled on your computer. For system partition Windows creates such points automatically. For other volumes, they must be activated manually.

System restore via rstrui.exe is performed as follows:



Using the Chkdsk command

The Chkdsk program starts scanning the storage media installed on the computer for damaged system files. If such elements are found, they are automatically restored.

This utility can be launched both using the Windows graphical shell and via the command line. In the first case, you need:



Correct Syntax chkdsk utilities via the command line is shown in the image.

Restoring the bootloader with 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 that work with this command, as well as their brief description.

Let's look at each key in more detail:



Using the BCDboot.exe Command

If you did not succeed in restoring the health of the Windows 7 system using the above commands, 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 Bootrec.exe F:\windows command repairs the failed zero sector. Instead of F:\windows, you need to specify the path to the Windows directory on your computer.

The Bootrec.exe utility is written as shown in the image.

Source is the path to the storage location Windows folders, from which the files required for reanimation will be copied.

  • /l language - allows you to set the boot language. It is an optional key.
  • /s drive letter - Specifies the name of the volume to copy to boot files. By default, the system volume is used for this purpose. This parameter is also optional.
  • /v - activates the function of detailed logging of the program operation (optional key).
  • /m - combines the properties of the old and new loader (optional parameter).

To date, many tools have been developed that allow you to restore Windows 7. So when right approach you will definitely be able to complete the task.

Command line- this is very handy tool to launch special Windows programs from under DOS. It can be useful when crashing or tweaking the operating system. For example, using it, you can go to the registry editor or view Startup. To start the command line, go to the START menu -> All Programs -> Accessories -> Command Prompt. Or you can run the Run command from the Start menu. How to run the Run command can be found in this article -.

In this post, take a look at the main command line commands which are necessary in daily work to adjust or correct the operation of the operating system.

regedit- the most famous and used command line command that allows you to enter the registry. Literally translated as - Registry Editor. Actually, that's all it says.

chkdisk- this command checks for errors file system And HDD, and it is able to restore the file system and in some cases bugs hard disk

systeminfo- allows you to view information about the installed operating system and configuration of your computer (does not work through "Run", only through the command line)

ipconfig- displays information about your IP address (does not work through "Run", only through the command line).

ipconfig /all- allows you to find out more detailed or extended information about your IP address, computer name, subnet mask, DHCP, DNS server, Main Gateway, MAC address and so on (does not work through "Run", only through the command line).

msconfig- shows the system configuration, autoloading of Windows services and programs. In it, you can choose one of three types of operating system startup - these are normal startup, diagnostic startup, and selective startup. You can see more detailed information by running this command.

cmd.exe- allows you to start the command line (DOS window) via START -> Run.

explorer- allows you to start or restart Explorer. For example, you have lost the bottom panel where it is quick launch and the START menu (this is Explorer), i.e. Some kind of failure occurred as a result of installing or uninstalling some program. The launch of the command can save the day Run using hotkey combination Win+R, and in the dialog box, type and run the Explorer command. Explorer should restart.

gpedit.msc- This command launches the Local Group Policy Editor.

services.msc- the command launches the control panel for the services and services of your computer.

You can also just run the command HELP, which displays more detailed information about Windows commands.


Using a laptop or desktop PC on the Windows 7 operating system, users often encounter problems loading it, system freezes, or a blue screen. The main causes of these problems can be viruses, deletion of system files and low-quality software. To solve these problems, it is enough to use system restore points.

These restore points are designed to restore the state of the OS to the point in time when it worked steadily. Each restore point is created automatically when there are some changes in the system. For example, when installing a driver or software.

In this article, we will pay special attention command line, with which we will restore Windows 7. By restoring the OS through the console, you will significantly speed up the process. Our article will be of particular interest to beginners. system administrators and advanced PC users.

Launching System Restore in the Console on Normal OS Boot

If in Windows 7, after loading, unstable operation is observed, programs do not open, system components freeze and components do not work, then in this case it is necessary roll back to the previous saved point. Let's run the console as Administrator. To do this, go to the menu " Start” and in the search we will type “ cmd". Then right-click on the found result and select in context menu paragraph " Run as administrator».

After the done actions, the console will start in Administrator mode. In the running console window, enter the command rstrui.exe


After executing the command, the System Restore Wizard will open. In the window that appears, click the Next > button to proceed to the selection of restore points.


Let's choose suitable a restore point at which Windows 7 functioned normally and continue.


In the window that opens, click the Done button and confirm the message. After confirming the message, we will start the system rollback to the selected restore point. If the recovery is successful, you will see a corresponding message.

As you can see, starting a recovery via the console is not difficult at all.

Recovery via console in safe mode

The recovery method described below is necessary if Windows 7 cannot be started normally. To go to the alternative menu Windows boot, when the system starts, press the F8 key (there may be other options, for example, Del or others). In this menu, you must select the item shown in the image below.


By selecting this item, the operating system will boot without GUI , and the only means through which you can control the system will be console. In the console window, enter the already familiar command rstrui.exe

By executing this command, we will open the System Restore Wizard. Select the appropriate access point in the wizard.


It can be seen from the example that it is identical to the previous one. The only difference is the launch Windows in safe mode with console support. Usually this method works almost always, even if the system heavily damaged by viruses, because at startup, the OS loads only the main drivers, and there is no access to the Internet.

Starting System Restore in the Console Using the Windows 7 Installation Disc

If the second method does not help restore the system, then the only option to start recovery using the console is installation disk or boot flash drive. Let's turn on our PC and boot from installation disk Windows 7.

Now let's go directly to the console itself. To do this, click on the hyperlink System Restore”, which will start searching for installed systems.


Select the operating system we need and move on to the next window.

In this window, select the item " Command line”, after which it must be launched.


In the console, we will type the command rstrui.exe, which is already familiar to us. After executing this command, the recovery wizard will start. The work of the wizard is identical to the examples described above. Therefore, we will skip the rest of the description of how the recovery wizard works.

Restoring a Windows Boot Record Using the Console

Using a PC with operating system Windows 7, users often encounter the problem of loading it and receive messages of this type when the OS starts.

Or like that.


The main culprit for this problem is a corrupted boot record. MBR or broken boot configuration BCD. You can solve this problem using the utility bootrec.exe. With the commands " /FixMbr" And " /FixBoot» The utility can create a new boot entry and fix it.

To use these commands, we need to boot from the installation disk and run the command line, as in the previous example. Let's use the first command /FixMbr» utilities bootrec.exe.


By running this command, we fixed our boot entry MBR. If this command does not help, then we will use the second command " /FixBoot» utilities bootrec.exe.


By executing this command, we will create a new boot entry that will allow us to start Windows 7.

The example shows that using bootrec.exe in most cases, you will be able to repair or fix the boot record in Windows 7. I would also like to note that the main reasons that damage or overwrite the boot record are:

  • Change of size local disk with the operating system using special software;
  • Installing old Windows OS over new. For example, Windows installation XP on the same PC with seven installed;
  • Third Party Recording boot sector, which does not support Windows. For example, linux GRUB bootloader;
  • Various viruses and malware.

Paying attention to the reasons that damage or overwrite the boot record, you will be able to keep your PC working.

BCDboot utility

As part of the installation Windows disk 7, there is another great utility with which you can restore the OS. We will also boot from the installation disk to the command line. Then enter the command shown below.


In our Windows case installed on the "E:\" drive, so we specified the path in the command " E:\windows". By executing this command, we will restore the configuration files BCD, as well as the bootloader file bootmgr.

By entering the bcdboot.exe command in the console, you can see a description of the utility, as well as a list of additional keys that can be used when it is launched.


MBRFix console utility

This console utility comes with multiboot disk Hiren's Boot CD.

Hiren's Boot CD it is a disc with dozens of programs that help many computer geeks and system administrators. The main task MBRFix is to restore the Windows bootloader. Disk image Hiren's Boot CD can be downloaded from the official website www.hirensbootcd.org. Booted from Hiren's Boot CD, we will be taken to its boot menu.


In this menu, select " Mini Windows XP» and press Enter . After completing this action, we will download the portable Windows version XP with the necessary utilities for diagnosing and repairing the system, including our utility MBRFix. Now let's go to HBCD Menu» from the desktop shortcut. Then in the menu Programs» go to the points « Partition/Boot/MBR/Commandline/MBRFix».


This will allow us to open the console utility MBRFix. In the console window, enter the command MBRFix.exe /drive 0 fixmbr /win7 /yes


This command restore boot record and bootloader, which will start Windows 7.

Use Disk Hiren's Boot CD with utility MBRFix especially convenient if there is no original disc with the seven.

Summing up

In this article, we tried to consider all the ways Windows Recovery 7 using the command line. Therefore, after reading this article, you can easily restore your computer under Windows control 7.

I would also like to note that if the OS system files are badly damaged or erased, then it will not be possible to restore the system or its bootloader. So if this is your case, then make a backup all important information on a hard drive and reinstall windows.

We hope that our material will help you restore the system or its boot record, and also allow you to avoid similar problems in the future or quickly solve them.

Related videos



tell friends