Installing Windows Manually

Most technicians and tech gurus have been there: you can’t get Windows to do a clean install properly on a perfectly capable machine or VM. One solution to this problem that might work is installing Windows manually.

All you need for this is a standard USB, DVD or ISO Windows install media. You don’t even need to faff around with Windows PE image creation or anything (unless you want to install unattended, in which case this isn’t the tutorial for you). It’s relatively simple, and all you need to do is follow these instructions.

Setup

To install windows manually you need:

  • A standard copy of Windows 10
  • The computer or virtual machine you want to install Windows on
  • A display, keyboard and mouse (obviously) if you’re using physical hardware or a way to connect to your virtual machine

Let’s get started!

Getting into the installation media

If you already know how to boot to and open the command prompt on your installation media then go to the next section.

For the people who do not know how to, if you haven’t done so already, plug in or mount your Windows installation media to your computer or virtual machine.

Next, turn on the computer/VM. You might need to press a key to get into the UEFI firmware to change the boot order if the installation media doesn’t boot. If so, the key you should press most likely will either be DEL, F11, or it will be on the screen for a split-second. If you don’t boot into it first try, power off and try again.

If you’re successful, you should see a screen similar to this:

Select your timezone and keyboard layout and press next. Now DO NOT PRESS “INSTALL NOW”! Instead you should press the “Repair your computer” button in the bottom left.

You should be greeted with this screen:

Go to Troubleshoot, then Advanced Options if it shows up, then Command Prompt.

In the Command Prompt

In the command prompt, type:

diskpart

You should be presented with this prompt:

DISKPART>

List the disks on your system by typing:

list disk

And then select the disk you want to install windows on by typing the following (replacing “<number>” with the Disk ### that you found in the previous step):

sel disk <number>

For example, for disk 0:

sel disk 0

After you’ve done this, type the following commands (these will erase all contents on your disk so make sure you have everything important on the drive backed up somewhere else and you have not selected the wrong disk):

clean
convert gpt 
create part efi size=500
format fs=fat32 quick 
assign letter w
create part primary
format fs=ntfs quick 
assign letter c
exit

The commands above wipe the drive, create the partitions, format them, and assign them temporary drive letters.

Don’t close the command prompt window yet, because there’s still more to do. If you did though, just go back to Troubleshoot -> Advanced Options -> Command Prompt.

Installing Windows

Installing windows via the command line is as easy as pie if you know the index number of the version of Windows that you want to install. Otherwise, it’s slightly harder but we’ll walk you through it.

First, you have to change directory to the install folder on the install media. Run the command:

cd /d D:\sources

Next, you have to pick the version you want to install. Run the following command to get the versions of Windows on your install media (you can skip this if you already know):

dism /get-wiminfo /wimfile:install.wim

You should get something that looks like this:

Take note of the index number above the version name you want to install (for example, in this case, Windows 10 Pro is index 6).

We will now install the image onto the drive. Type this command, replacing <INDEX> with the number you made a note of before:

dism /apply-image /imagefile:install.wim /index:<INDEX> /applydir:c:\

You should get a screen like this:

Wait until the tool finishes.

Installing the boot files

This is the easiest part, only requiring one command. If you were paying attention earlier, we made an efi partition as well as a primary partition and assigned the EFI partition the temporary drive letter W:\. This EFI partition stores the boot files, and is usually not visible. The only reason we are assigning it a drive letter is because the boot files haven’t been written to it. Without boot files, Windows cannot boot.

To add the boot files to our EFI partition, type the command:

bcdboot C:\Windows /s W:

This command writes the boot files for our Windows installation (mounted at C) to the EFI partition which we temporarily mounted at W).

Editing the registry

Editing the registry can break your system, but in this case it is necessary to bypass the system out of box experience (OOBE). The registry editor also seems daunting, but it is really powerful when you know what you’re doing. Even if you don’t know, this tutorial will show you exactly what to do.

Run the following command to open registry editor:

regedit

You should see a screen like this:

Click on HKEY_LOCAL_MACHINE so it is highlighted (like in the picture above). Next, click File at the top and then Load Hive.

Browse to C:\Windows\System32\config\ and select SOFTWARE. When a dialog box appears asking for Key Name, type SOFT.

Do the same thing again, but select SYSTEM instead of SOFTWARE and give it the key name SYS.

That just loaded up our registry from the copy of windows we just installed into the Windows Install Media’s registry editor temporarily so we can edit it.

Next, use the sidebar on the left-hand side to browse to HKEY_LOCAL_MACHINE\SOFT\Microsoft\Windows\CurrentVersion\Policies\System and then Right Click -> New -> DWORD (32 bit) Value. Name this VerboseStatus and then double click it. Now set the value to 1 and press OK. This enables some useful debugging information when starting up, shutting down, etc.

Now double click on EnableCursorSuppression. If you don’t see it create it like in the last step. This time, set it to 0. This ensures that we can use our mouse cursor when rebooting after we’re done here.

There’s one last thing we have to do in the registry editor. Go to HKEY_LOCAL_MACHINE\SYS\Setup. Double click on CMDLine and set it to cmd.exe, then press OK. This gives us a command prompt instead of starting windeploy straight away.

All we need to do now is a reboot. Close the registry editor and the command prompt, then press the Turn Off Your PC button. Remove your Windows installation media and turn your computer back on again.

Final Steps – After reboot

We’re nearly there. You’ve just installed Windows and now you need to configure it.

Wait until command prompt pops up. You can then type the following command:

oobe\windeploy

It should then display some text at the bottom under the spinny thingy. If you don’t see it move your command prompt window up.

When it gets to the Getting Ready stage as shown above, type the commands:

net user /add User
net localgroups /add users User
net localgroups /add administrators User

This adds a user and gives them necessary groups. Now, launch registry editor again:

regedit

We don’t need to load the registry again as we’re now on the windows installation. Nevertheless, go to HKEY_LOCAL_MACHINE\SYSTEM\Setup and set the following values to 0:

Now you can close the registry editor and the command prompt. Your system should now reboot. Wait for 5 minutes and if Windows hasn’t started properly you may need to force reboot (hold the power button for 10 seconds). If that fails, you will need to try again from the start.

You should now be in the user OOBE (different from the system OOBE). Turn off all the settings and press accept (unless you want Microsoft to track you, of course).

You should now be on the desktop and you should be able to install display drivers, network drivers, and anything else you might need!