📌  相关文章
📜  boot pendrive windows cmd - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:29:38.420000             🧑  作者: Mango

Booting Windows from a Pendrive Using Command Prompt

As a programmer, it is essential to know how to boot Windows from a bootable USB drive using Command Prompt. This allows you to troubleshoot and repair any issues with your Windows installation, even when your operating system is not functioning correctly.

Prerequisites

Before you proceed with booting Windows from a pendrive using Command Prompt, you need to have the following:

  1. A USB drive with at least 4GB of storage capacity
  2. A valid Windows 10 installation file
  3. Administrative access to a computer running Windows 7, 8 or 10
Steps to Boot Windows from a Pendrive Using Command Prompt
  1. Insert the USB drive into your computer's USB port.
  2. Open the Command Prompt as an administrator. To do this, right-click on the Start button and select "Command Prompt (Admin)".
  3. Type "diskpart" and hit Enter. This will open the Diskpart utility, which allows you to manage your computer's drives and partitions.
  4. Type "list disk" and hit Enter. This will display a list of all the available disks on your system.
  5. Identify the USB drive by its size and note its disk number.
  6. Type "select disk X" (where X is the disk number of your USB drive) and hit Enter.
  7. Type "clean" and hit Enter. This command will erase all data on the selected disk.
  8. Type "create partition primary" and hit Enter. This will create a new primary partition on the USB drive.
  9. Type "format fs=fat32 quick" and hit Enter. This will format the partition with the FAT32 file system.
  10. Once the format process is complete, type "assign" and hit Enter. This assigns your USB drive a unique drive letter.
  11. Type "exit" and hit Enter to exit the Diskpart utility.
  12. Copy all the files from the Windows installation file to the root directory of the USB drive.
  13. Restart your computer and enter the BIOS menu by repeatedly pressing the appropriate function key during startup. The function key varies depending on your computer's manufacturer, but it is usually F2 or Delete.
  14. In the BIOS menu, locate the Boot Order or Boot Priority settings and select USB as the first boot device.
  15. Save your changes and exit the BIOS. Your computer will now boot from the USB drive.
  16. Once the Windows installation screen appears, follow the prompts to install Windows.
Conclusion

Booting Windows from a pendrive using Command Prompt is a basic skill that every programmer should have. It allows you to repair or reinstall Windows when your operating system is not functioning correctly. With this guide, you can easily and quickly create a bootable USB drive and boot Windows from it using Command Prompt.