Install windows using cmd

Команда install (winget) install command (winget)

Сейчас предоставляется общедоступная предварительная версия Диспетчера пакетов Windows и средства winget. Перед выпуском общедоступной версии в решения могут быть внесены значительные изменения. Windows Package Manager and the winget tool are in public preview and may be substantially modified before they are generally available. Майкрософт не дает никаких гарантий, явных или подразумеваемых, в отношении предоставленной здесь информации. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Команда install программы winget устанавливает указанное приложение. The install command of the winget tool installs the specified application. Чтобы указать приложение, которое нужно установить, используйте команду search. Use the search command to identify the application you want to install.

Для команды install необходимо указать точную строку для установки. The install command requires that you specify the exact string to install. В случае какой-либо неоднозначности вам будет предложено дополнительно отфильтровать команду Install для уточнения приложения. If there is any ambiguity, you will be prompted to further filter the install command to an exact application.

Использование Usage

winget install [[-q] \ ] [\ ]

Аргументы Arguments

Доступные аргументы перечислены ниже. The following arguments are available.

Аргумент Argument Описание Description
-q,—query -q,—query Запрос, используемый для поиска приложения. The query used to search for an app.
-?, —help -?, —help Позволяет получит дополнительную справку по этой команде. Get additional help on this command.

Параметры Options

Эти параметры позволяют настроить функцию установки в соответствии со своими потребностями. The options allow you to customize the install experience to meet your needs.

Параметр Option Описание Description
-m, —manifest -m, —manifest За этим параметром должен следовать путь к файлу манифеста (YAML). Must be followed by the path to the manifest (YAML) file. Манифест можно использовать для запуска функции установки из локального файла YAML. You can use the manifest to run the install experience from a local YAML file.
—id —id Ограничивает установку приложением с определенным идентификатором. Limits the install to the ID of the application.
—name —name Ограничивает поиск приложением с определенным именем. Limits the search to the name of the application.
—moniker —moniker Ограничивает поиск моникером, указанным для приложения. Limits the search to the moniker listed for the application.
-v, —version -v, —version Позволяет указать точную версию для установки. Enables you to specify an exact version to install. Если параметр не задан, будет установлено приложение с наибольшим номером версии. If not specified, latest will install the highest versioned application.
-s, —source -s, —source Ограничивает поиск источником с указанным именем. Restricts the search to the source name provided. За этим параметром должно следовать имя источника. Must be followed by the source name.
-e, —exact -e, —exact Ищет точное совпадение со строкой в запросе, выполняя при этом проверку на учет регистра. Uses the exact string in the query, including checking for case-sensitivity. Поведение по умолчанию для подстроки не используется. It will not use the default behavior of a substring.
-i, —interactive -i, —interactive Запускает установщик в интерактивном режиме. Runs the installer in interactive mode. При взаимодействии по умолчанию отображается ход выполнения установщика. The default experience shows installer progress.
-h, —silent -h, —silent Запускает установщик в автоматическом режиме. Runs the installer in silent mode. Блокирует весь пользовательский интерфейс. This suppresses all UI. При взаимодействии по умолчанию отображается ход выполнения установщика. The default experience shows installer progress.
-o, —log -o, —log Направляет данные журнала в файл журнала. Directs the logging to a log file. Необходимо указать путь к файлу, для которого у вас есть права на запись. You must provide a path to a file that you have the write rights to.
—override —override Строка, которая будет передана непосредственно в установщик. A string that will be passed directly to the installer.
-l, —location -l, —location Расположение для установки (если поддерживается). Location to install to (if supported).

Примеры запросов Example queries

В следующем примере устанавливается определенная версия приложения. The following example installs a specific version of an application.

В следующем примере выполняется установка приложения по его идентификатору. The following example installs an application from its ID.

В следующем примере выполняется установка приложения по версии и идентификатору. The following example installs an application by version and ID.

Множественный выбор Multiple selections

Если по запросу, отправленному программе winget, найдено несколько приложений, winget отобразит результаты поиска. If the query provided to winget does not result in a single application, then winget will display the results of the search. Это даст вам дополнительные данные, необходимые для уточнения условий поиска и правильной установки. This will provide you with the additional data necessary to refine the search for a correct install.

Лучший способ ограничить выбор одним файлом — использовать идентификатор приложения в сочетании с параметром точного запроса. The best way to limit the selection to one file is to use the id of the application combined with the exact query option. Например: For example:

Локальная установка Local install

Параметр manifest позволяет установить приложение, передавая YAML-файл непосредственно клиенту. The manifest option enables you to install an application by passing in a YAML file directly to the client. Параметр manifest используется следующим образом. The manifest option has the following usage.

Использование: winget install —manifest \ Usage: winget install —manifest \

Параметр Option Описание Description
-m, —manifest -m, —manifest Путь к манифесту устанавливаемого приложения. The path to the manifest of the application to install.

Файлы журнала Log files

Если файлы журналов для winget не перенаправлены, они будут находиться в следующей папке: %temp%\AICLI\*.log. The log files for winget unless redirected, will be located in the following folder: %temp%\AICLI\*.log

How to Install Windows 10 from Command Prompt? (2 Methods)

If you want to upgrade Windows or get rid of system issues, installing Windows 10 from Command Prompt is a good solution. Let’s see how to do it, and don’t forget to backup your system just in case.

By AOMEI / Last Updated April 8, 2021

Content of this article:

Need to install Windows 10 from Command Prompt

Windows 7 has reaches its end of life January 14, 2020, thus it’s urgent for users toВ upgrade to Windows 10В . Because Microsoft will not provide any technical support and the Microsoft customer service, Related services and device will be disconnected in the near future by 2023 at the latest.В

Microsoft users are given many ways to perform a system upgrade, but these methods usually don’t work correctly, and they may bring unwanted files, settings and apps to the new system.

Just to be on the safe side, a clean installation can be your best choice. Additionally, when your computer is having system and other issues, you can quickly resolve them via a system installation, as it will remove everything from the hard drive and start from scratch. Meanwhile users can get rid of viruses and improve battery life.

How to install Windows 10 with Command Prompt?

For many users, system installation involves a complex process. However, Command Prompt makes your operations easier. The following two methods will show you how to use Command Prompt to install Windows 10.

Before you try any method below, please make some preparations in advance.

  • DownloadВ Windows 10 ISO files from Microsoft.
  • Mounted the ISO image and assign a drive letter for it, here take G: as an example. You can navigate to the ISO image file, then right click it andВ choose Mount from the drop-down menu.В

Method 1. Install Windows 10 directly from the ISO files

Step 1. Press Windows logo key + R at the same time. Type diskpart in the Run box and then click OK.

Step 2. Type list vol and then press Enter to find the partition containing the ISO files.

Step 3. Type G:\ISO_Files\setup.exe and then press Enter (G represents the number of the volume in which the ISO image is stored).

Step 4. The Windows Setup page appears. Make the selections you prefer and then click Next.

Step 5. Click Install now to continue.

Step 6. If you’re installing Windows 10 for the first time, you must enter a genuine product key. If you’re reinstalling Windows 10, just click I don’t have a product key. Then click Next.

Step 7. Select an edition of Windows 10. Then click Next.

Step 8. Tick the I accept the license terms checkbox and then click Next.

Step 9. Select Custom: Install Windows only (Advanced) from the list.

Step 10. You will be asked where you want to install Windows. Choose the drive or partition that you want to use for Windows 10.Then click Next.

Step 11. Once the installation is done, you need to restart your computer by clicking Restart now.

Method 2. Install Windows 10 from a bootable USB

Installing Windows 10 with a bootable USB can greatly reduce installation time. To create a bootable USB flash drive with the installation files, you can insert a USB (at least 4GB in size) to your computer and then follow these steps:

Step 1. Press Windows logo key + R at the same time. Type diskpart in the Run box and then click OK.

Step 2. Type the following commands one at a time and press Enter after each command:

list disk

select disk 1

cleanВ

create partition primary

select partition 1

active

format fs=ntfs quick (or format fs=fat32 quick

assign letter=X

Notes:
* The clean command marks all the data on the drive as deleted and it will become invisible. Please be sure you want to do this!В
* Remember to replace 1 with the number of the USB flash drive and change X for any available letter you want to use for your USB flash drive. They are just an example here.

Step 3. Type exit and then press Enter to quit the diskpart tool.

Step 4. Navigate to the boot folder of the Windows 10 ISO files and make it bootable. To do this, type the commands below one at a time and press Enter after each command:

G:

cd boot

bootsect /nt60 X:

xcopy G:\*.* X:\ /E /F /H

Notes:
*Replace G В with the drive letter of your mount drive as it appears in File Explorer. It contains the Windows 10 ISO image file.В
*ReplaceВ X with the correct drive letters forВ USB flash drive.

Step 5. Once that’s done, you can get a bootable USB flash drive.

Step 6. Then, plug the bootable USB flash drive into the device you wish to install Windows 10 and boot from it. As soon as the computer boots, press any key to get into the Windows Setup page.

Step 7. Repeat Step 4 to Step 11 mentioned in Method 1 to install Windows 10.

Note: The installation process will erase everything on the primary hard drive of your computer. If you have some important files on it, you’d better backup files to an external hard drive in advance.

Best time to backup your system for protectionВ

After installing Windows10В from Command Prompt, your computer is a complete fresh version, it only has the operating system and boot partition(s) or system files required to start Windows.В If you create a system image for it right now, it’sВ totally a factory image that can help you repair your computer at any time.

Also, if you don’t want to reinstall programs or lose your files in the event of a disaster, you can choose to install all the programs you will use in the near future first and sync files you want to protect to the fresh version of computer, then backup all of them together.

To make it, you need a Windows 10 backup utility. Many usersВ choose to use the built-in tool in the begining, but later they are disappointed to find that Windows Backup keeps failing. Thus, it’s suggested to use a third-party free backup software like AOMEI Backupper Standard, whichВ enables you to backup system to internal/external hard drives, cloud drives, NAS devices and network with ease.

And it has more advanced features such as schedule automaticВ backup based on daily, weekly and monthly, incremental and differential backup and so on. Windows 10/8.1/8/7Vista/XP are supported. Download this freeware now andВ follow the steps below to backup your system.

Step 1. Install and open this freeware.

Step 2. Click System Backup under Backup tab.

Step 3. The Task Name can be modified by your needs. The related system partitions are selected by default. Select the destination path (here is F:\) to store the system image.

Step 4. Click Schedule and OK to enable daily incremental backup(the default option), or change them per your needs. Confirm your operations and then click Start Backup.

Notes:
Options: click it to comment this backup task and enable email notification.
Schedule: set the backup task to run automatically. Daily, Weekly and Monthly are supported. To enjoy Event triggers, andВ USB plug inВ modes, you need to do an edition upgrade.
Scheme: it deletes the older backups automatically. This feature is available in AOMEI Backupper Professional.
You can visit Home > the system backup task > Restore to restore Windows 10 system image to new hard driveВ or other locations.

Verdict

Two efficient methods are described here to assist you to install Windows 10 from Command Prompt. You can choose one of them based on your own situations. After installing, don’t forget to protect your system by using AOMEI Backupper Standard.В

After a fresh install, it’s the best time to create a factory image and you can set a scheduled backup task to track changes you made later. In addition, you still can use this freeware to backup files, partition, or entire disk. Also, it’s a professional disk clone software, so you can clone disk to larger disk, clone larger HDD to smaller SSD, clone only OS, etc.В

Читайте также:  Долго запускается windows 10 pro
Оцените статью