How to add network driver to Windows 10 PE

Very recently I have been trying to reinstall my Laptop using my WinPE approach as it didn’t have a optical drive anymore. However my problem was that the WinPE image I created was lacking the network driver for my laptop. So then I recreated a WinPE USB drive using the Windows 10 ADK, hoping it would include the required driver. However unlucky me I still had no network when I booted by new laptop using my new Windows 10 PE USB drive. Therefore I had to add the network driver for my laptop to the WinPE image in order to be able to connect to the network and start my Windows 10 installation from my shared network folder.

Figuring out the required driver

Before starting the reinstall I first figure out what drivers are installed. On Windows you can find information about your drivers and your devices using msinfo32.

So simply fire up msinfo32 by hitting the Windows key on your keyboard and type msinfo32.

Browse to Components -> Network -> Adapter. Here you will find a list of all network adapters. Scroll down to your Ethernet adapter and note down the driver name and the device name in order to download the appropriate Windows 10 driver. In my case the network device looked like this.

1
2
3
(NIC)Name [00000007] Intel(R) 82579LM Gigabit Network Connection
PNP Device ID PCI\VEN_8086&DEV_1502&SUBSYS_21CE17AA&REV_04\3&E89B380&0&C8
Driver c:\windows\system32\drivers\e1d65x64.sys

With this information you can now look at Intel’s or your laptop vendor webpage for the correct drivers for Windows 10. Download these so we can add them to our WinPE image later on.

In my case I got a package with a few subfolders (containing drivers for Win 7 Win 8 Win 8.1 and Win 10).

  • NDIS62 –> Windows 7
  • NDIS63 –> Windows 8
  • NDIS64 –> Windows 8.1
  • NDIS65 –> Windows 10

We are about to install the driver with the name e1d65x64.inf from the NDIS65 folder to our WinPE image. In the folder I downloaded there where multiple versions, so I went for the one with the same name as it was installed previously on my Windows 10.

TL;DR

Download the Windows 10 ADK and install it on your computer. Now open as admin your Deployment and Imaging tools environment (Just hit the windows key on your keyboard and start typing on Windows 10 to find it…).

Deployment and Imaging tools environment
1
2
3
4
5
copype amd64 C:\winpe_amd64_win10
Dism /Mount-Image /ImageFile:"C:\winpe_amd64_win10\media\sources\boot.wim" /index:1 /MountDir:"C:\winpe_amd64_win10\mount"
Dism /Add-Driver /Image:"C:\winpe_amd64_win10\mount" /Driver:"C:\DRIVERS\WIN\ETHERNET\PRO1000\Winx64\NDIS65\e1d65x64.inf"
Dism /Unmount-Image /MountDir:"C:\winpe_amd64_win10\mount" /commit
MakeWinPEMedia /UFD E:\winpe_amd64_win10 F:

Install Windows 10

Now I could finally start my installation using the Windows install files on my shared network location. So in Windows PE you will have a command prompt available. In the command prompt I checked if I had a network connection with the network driver build into the Windows PE image.

1
2
ipconfig
ping 192.168.0.2

Now I am sure I have a network connection and I can also reach the computer hosting my share I can simply use net use in order to connect to the network share. Then swich to this newly attached network drive and run the Windows 10 setup.

1
2
3
net use z: \\192.168.0.2\Win10
z:
setup.exe

Voila, now your Windows 10 installation will start. Make sure you stay connected with the network cable until first reboot, from that point on you can switch to Wifi. The Windows 10 installation will take care of setting up your Wifi network adapter properly. Give it a couple of minutes to get you fully up and running.

Bonus

First thing I usually do is getting Chocolatey setup. Chocolatey is a package manager for Windows. It allows you to easily install and update your software from the commandline. Similar to Homebrew for MacOS or e.g. apt for Ubuntu. To install Chocolatey, run the installation command from their webpage.

Commandprompt
1
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

With chocolatey installed you can now open Powershell in Administrator mode (Right click -> Run as Administrator). Me woudn’t be me if I didn’t prepare a powershell script with all my desired software listed out so I could easily install it.

To get an easy overview of which software is available you can browse the packages on Chocolatey packages.

Below I took an extract of my personal script to give you an idea on how I get my Windows freshly installed within 45 minutes without to many manual steps.

Powershell
1
cinst -y git git-lfs vscode GoogleChrome slack docker-for-windows 7zip winscp docker-machine golang nodejs gradle intellijidea-community dotnetcore-sdk vlc Firefox gpg4win graphviz gradle jdk8 openjdk python python2 keepass mysql.workbench postman

And the list goes on and on in my case. To get all my favorite developer tooling in place.

By Intention I first install Git and vscode, so I can already start cloning my repos and run my bash scripts (in git Bash) like the one below that installs my vscode extensions.

install-vscode-extensions.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
EXTENSIONS=(
ms-vscode.go
ms-vscode.csharp
ms-vscode.powershell
ms-python.python
vscoss.vscode-ansible
editorconfig.editorconfig
eamodio.gitlens
esbenp.prettier-vscode
vsmobile.vscode-react-native
dsznajder.es7-react-js-snippets
peterjausovec.vscode-docker
ms-kubernetes-tools.vscode-kubernetes-tools
technosophos.vscode-make
secanis.jenkinsfile-support
eg2.vscode-npm-script
christian-kohler.npm-intellisense
sonarsource.sonarlint-vscode
djabraham.vscode-yaml-validation
redhat.vscode-yaml
)

for ext in ${EXTENSIONS[@]} ; do
code --install-extension $ext
done

Now you have installed your desired software using Chocolatey you can keep your software updated using the following commands in Powershell.

Check for updates
1
choco outdated
Update all software
1
cup all -y
Update specific software only
1
cup docker slack -y

In case you ever want to uninstall a piece of software you can allows get a list of installed software and run the uninstall command.

List installed packages
1
clist --lo
Uninstall
1
choco uninstall -y virtualbox

References

Unfortunatily I didn’t went over the hassle of trying to get Wifi working on my Win PE image. I figured that would involve a bit more work which I didn’t want to spent effort on as I have access to cable anyhow. Looking forward to your tips and tricks in the comments.

Share