User:Insomnia/Sandbox/6

This guide provides steps to install Windows without using the normal setup program (aka the "unintended" method) on Windows 8.1 and later on UEFI systems. Do note that setting up Windows using this method may break the system if the steps weren't followed correctly as it tampers with the registry and the disk.

Disk partitioning & image applying[edit | edit source]

  1. Boot into the setup media.
  2. Press Shift+F10 to invoke the Command Prompt.
  3. Partition the disk (these steps applies to clean disks)[a]
    1. Type diskpart.
    2. Select the preferred disk: sel dis <disk number>[b]
    3. Convert the disk to GPT: conv gpt
    4. Create boot partition (important)
      1. cre par efi size=<size>[c]
      2. for fs=fat32 quick
      3. assign letter w
    5. Create install partition:
      1. cre par pri (use size= (in MB) to give it a fixed size or left intact to create based on all of the remaining disk spaces left)
      2. for fs=ntfs quick
      3. assign letter c
    6. Exit DiskPart: type exit
  4. Redirect to the install media: cd /d D:\Sources
  5. Apply the installation image - this step is the most important: type dism /apply-image /imagefile:install.wim /index:<sku> /applydir:C: and wait[d][e]
  6. Create boot files (important): bcdboot C:\Windows /s W:

Setting up[edit | edit source]

There are two ways to set up:

  1. Normal method: Restart the device by using wpeutil reboot and go through the OOBE manually
  2. OOBE bypassing method:
    1. On a Command Prompt window, type regedit
    2. Select the HKEY_LOCAL_MACHINE key.
    3. Click File > Load Hive
    4. Go to C:\Windows\System32\config, open the SOFTWARE file and call it "soft", repeat the same step with SYSTEM file and call it "sys"
    5. Navigate to HKEY_LOCAL_MACHINE\soft\Microsoft\Windows\CurrentVersion\Policies\System!EnableCursorSurpression, and set it to 0.[f]
    6. Navigate to HKEY_LOCAL_MACHINE\sys\Setup!CmdLine and set it to cmd.exe. If done correctly, Command Prompt should open in the fake boot screen.
    7. Reboot.
    8. In the Command Prompt window on the fake boot screen, type oobe\windeploy to start the necessary services.
    9. Create an user account:
      1. net user /add <username>[g]
      2. net localgroup /add users <username>[h]
      3. net localgroup /add administrators <username>
    10. Open Registry Editor (by typing regedit
    11. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\Setup and set the SetupType, OOBEInProgress and SystemSetupInProgress values to 0.
    12. In the Command Prompt window, type exit. After that, a "Please wait" screen should show up. Wait for 4-5 minutes in that screen and then reboot.
    13. The system should sign in now. After that, the privacy selection screen will show up. Either complete the steps shown in the screen or disable it through the registry.

Notes[edit | edit source]

  1. If there is a pre-made install partition, after step 3.2 use sel par <partition number> (use lis par to get partition number), skip step 3.3 and 3.5.1, and do step 3.4 later.
  2. To get disk number, type lis dis
  3. The recommended size is 100 - 500 MB
  4. To get the <sku> ID, type dism /get-imageinfo /imagefile:install.wim
  5. If DISM reports the image was not found, try replacing install.wim in each command with install.esd
  6. This step is to unhide the cursor in the fake boot screen for easier steps performance.
  7. Replace <username> with the user's preferred username.
  8. From this step, <username> is the username that the user provided when performing the previous step.