WinPE - disable networking


Refaus

New member
Local time
9:16 PM
Posts
7
OS
Windows 11
I'm trying to remove/disable/prevent networking for a bootable Macrium Reflect WinPE rescue medium.

I followed this guide, but I got stuck at the 'Microsoft-Windows-Setup' component requirement.
I don't see how I could add that component to my boot.wim file, which doesn't have it. It's not a cab file like one of these, but it is included in the install.wim of the Windows 11 ISO.
Is there a way to do it?

If not, I'm also looking for other suggestions on how to disable internet capabilities. I tried deleting some "net" files from System32, but then the WinPE couldn't boot.
 

My Computer

System One

  • OS
    Windows 11
I tested your idea and it doesn't work. The reason is Macrium launches from WinPE's winpeshl.ini, and when it exists -- it ignores startnet.cmd.

When you build Macrium's WinPE, driver support will be included in boot.wim's default drivers, or copied from the host. Even if you asked Macrium not to copy the host's drivers, boot.wim might recognize your network device.

I used NTLite to load Macrium's ISO, and remove all network drivers. You can also mount boot.wim with DISM, and manually remove them. But it's a lot of repetitive work, and NTLite (free edition) makes this a breeze by removing Components -> Drivers -> Network adapters.

After making a network driver-free ISO:

Windows 10 x64-2023-03-06-15-55-12.png

Windows 10 x64-2023-03-06-20-20-25.png
 

My Computer

System One

  • OS
    Windows 7
I got stuck at the 'Microsoft-Windows-Setup' component requirement.
I am not sure that package is available separately.

1. it is possible to use boot.wim from the installation media which already includes that package.

several ways to do it.

delete the first image from boot.wim and then specify it as the custom wim "choose base wim" when creating the macrium media.

or just copy the macrium folder and winpeshl.ini from your current macrium bootable wim into image 2 of boot.wim copied from the installation media.

then your .xml file should work, if your link is correct.

OR

2. In case macrium tries to run wpeinit.exe anyway, one simple way is to rename it something like wpeinit1.exe so macrium can't run it, but if you want to run it , then cmd prompt type
wpeinit1.exe

that might be easier.

EDIT : just tested number 2 unfortunately macrium started network even with wpeinit renamed.
Perhaps ask at their forum how to disable that "feature"
 
Last edited:

My Computers

System One System Two

  • OS
    Win7
    Computer type
    PC/Desktop
    CPU
    i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Monitor(s) Displays
    benq gw2480
    PSU
    bequiet pure power 11 400CM
    Cooling
    cryorig m9i
  • Operating System
    win7
    Computer type
    PC/Desktop
    CPU
    pentium g5400
    Motherboard
    gigabyte b365m ds3h
    Memory
    1x8gb 2400
    PSU
    xfx pro 450
I have not tried this myself, just taking a stab at it, but what about this...

When creating Macrium Reflect Rescue Media Builder, it will place drivers in the C:\Boot\macrium folder. Could you simply remove the Ethernet drivers from there? Or is that only drivers that are not already included in the base image?
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I have not tried this myself, just taking a stab at it, but what about this...

When creating Macrium Reflect Rescue Media Builder, it will place drivers in the C:\Boot\macrium folder. Could you simply remove the Ethernet drivers from there? Or is that only drivers that are not already included in the base image?
in addition to the macrium drivers folder, the wim file will already have drivers included in system32\drivers and the filerepository , which might work anyway.

could faff around removing the inbox network drivers with dism++ or some other tool.

dism++-delete-drivers.jpg
 
Last edited:

My Computers

System One System Two

  • OS
    Win7
    Computer type
    PC/Desktop
    CPU
    i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Monitor(s) Displays
    benq gw2480
    PSU
    bequiet pure power 11 400CM
    Cooling
    cryorig m9i
  • Operating System
    win7
    Computer type
    PC/Desktop
    CPU
    pentium g5400
    Motherboard
    gigabyte b365m ds3h
    Memory
    1x8gb 2400
    PSU
    xfx pro 450
This is what the new Bing AI suggested to me. Again, I have not tested this:

Image2.jpg
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Thank you for the suggestions.
I should mention that I also tried with the WinRE option in Macrium Reflect, but it also includes the basic Windows network drivers (which do provide connectivity in the bootable environment). But since WinRE doesn't require an additional download, I'll probably use it going forward.

The only wim that I've seen with that 'Microsoft-Windows-Setup' component is the install.wim from the Windows ISO and it's quite big, around 4.5GB. The smaller boot.wim from the ISO doesn't have it. UPDATE: I tried making a rescue image with the big install.wim file, both with and without the edits, but it wouldn't boot, said it needs to be repaired.

So for now I'm looking at removing the network drivers.


I used NTLite to load Macrium's ISO, and remove all network drivers. You can also mount boot.wim with DISM, and manually remove them. But it's a lot of repetitive work, and NTLite (free edition) makes this a breeze by removing Components -> Drivers -> Network adapters.
How would the manual DISM method work? Would I have to name/remove all those individual .inf entries?

I tried with the free version of NTLite, loaded the wim and all. But I can't remove the drivers, it says "Locked, blue title components require a license."
ntlite locked.png



could faff around removing the inbox network drivers with dism++ or some other tool.

View attachment 54479

I tried with Dism++ too, got to the step in your screenshot, but when I click Delete I get an error: "No such interface supported". Does it work for you?

dism++ error 2.png
 
Last edited:

My Computer

System One

  • OS
    Windows 11
I will check. It doesnt want to uninstall inbox drivers. I have uninstalled 3rd party drivers with it..

according to a post by Knarz, the first two bytes need to be changed from FF to 00 in Version to be able to uninstall them.

drivers-hive.jpg
 
Last edited:

My Computers

System One System Two

  • OS
    Win7
    Computer type
    PC/Desktop
    CPU
    i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Monitor(s) Displays
    benq gw2480
    PSU
    bequiet pure power 11 400CM
    Cooling
    cryorig m9i
  • Operating System
    win7
    Computer type
    PC/Desktop
    CPU
    pentium g5400
    Motherboard
    gigabyte b365m ds3h
    Memory
    1x8gb 2400
    PSU
    xfx pro 450
I see. Meanwhile, I was able to delete all those Windows network drivers manually from the mounted WIM, they're located in \Windows\System32\DriverStore\FileRepository\.
It works, no more networking. But doing it manually is a chore, it's about 50 entries and it's easy to make a mistake... so I'm still looking for a faster way.
 

My Computer

System One

  • OS
    Windows 11
If you dissable Ethernet and Wifi in Bios, they are not passed thru to the OS.... it doesn't matter what drivers are in the booting media

note they will also >>not<< appear in device manager, until re-enabled
 

My Computer

System One

  • OS
    w7/10/11ip
    Computer type
    Laptop
    Manufacturer/Model
    hp probook 450 g8
    CPU
    i5 11th gen
Just out of curiosity, if you don't mind my asking, why do you want to disable networking?
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
If you dissable Ethernet and Wifi in Bios, they are not passed thru to the OS.... it doesn't matter what drivers are in the booting media

note they will also >>not<< appear in device manager, until re-enabled
OP is only trying to speed up running Macrium Reflect in WinPe/Re mode (would save around 10 seconds on my pc)- it would take longer to disable drivers before hand, then reenable afterwards, aside from forgetting.
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
Just out of curiosity, if you don't mind my asking, why do you want to disable networking?
I asked the Macrium Team same thing - it just adds about 10 seconds on my pc to start up Reflect (probably more depending on drive type). It is just irritating as I never back up over a network. You can turn off wifi but not ethernet.
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
The good news is you only have to strip boot.wim once, since you can import a saved WIM image in the Advanced settings.
 

My Computer

System One

  • OS
    Windows 7
I asked the Macrium Team same thing
Is there a way of stopping macrium from doing that, and the other "feature" which is changing the pe drive letters.
 

My Computers

System One System Two

  • OS
    Win7
    Computer type
    PC/Desktop
    CPU
    i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Monitor(s) Displays
    benq gw2480
    PSU
    bequiet pure power 11 400CM
    Cooling
    cryorig m9i
  • Operating System
    win7
    Computer type
    PC/Desktop
    CPU
    pentium g5400
    Motherboard
    gigabyte b365m ds3h
    Memory
    1x8gb 2400
    PSU
    xfx pro 450
I had thought that maybe there was some sort of security consideration. But to shave 10 seconds off the boot time - is this really worth that effort? Do you boot into the Macrium Reflect Recovery Media that frequently to make this worth the effort?

BTW, here is something to try:

I have another backup program that also uses Win RE or Win PE recovery media. In that program, I noticed that when it gets to the point of loading the network drivers, I can simply tap the ESC key and it will bypass the loading of the network components and just skip ahead immediately. Maybe that is worth trying in Reflect.

My PC is busy running a long running operation right now so I can't reboot to try this now. But when I get in front of another system in a little while I will give it a shot.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
tap the ESC key
that allegedly works in macrium, if you can get the timing right.
 

My Computers

System One System Two

  • OS
    Win7
    Computer type
    PC/Desktop
    CPU
    i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Monitor(s) Displays
    benq gw2480
    PSU
    bequiet pure power 11 400CM
    Cooling
    cryorig m9i
  • Operating System
    win7
    Computer type
    PC/Desktop
    CPU
    pentium g5400
    Motherboard
    gigabyte b365m ds3h
    Memory
    1x8gb 2400
    PSU
    xfx pro 450
I had thought that maybe there was some sort of security consideration. But to shave 10 seconds off the boot time - is this really worth that effort? Do you boot into the Macrium Reflect Recovery Media that frequently to make this worth the effort?
I did some actual timing, and it was taking longer than I suggested (never bothered time it before) and it was taking about 12 seconds to load a network driver and then 6 seconds to load networking.

I looked closer at the driver it was loading, and by examination of my drivers with RAPR (Driver Store Explorer), I realised the driver it was loading was a wifi driver despite having selected not to use wifi option!

I recreated the rescue media, specifically excluding the wifi driver using advanced driver options to not include driver, and this made a big difference - it jumped straight to loading network drivers (presumably loading the inbuilt boot.wim ethernet drivers) and it only took 6 seconds.

So I have significantly reduced startup time to point where any extra effort is just not worth it, as you suggest. Law of diminishing returns!

So this thread has helped me.
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
The good news is you only have to strip boot.wim once, since you can import a saved WIM image in the Advanced settings.
Yes. A modified wim should last a long time, before some major change makes it unusable.

That being said, I extracted the names of all those 50+ entries that Dism++ labeled 'Microsoft Network adapters' and put them in a batch file. So deleting them is just one click now. Well, you need to change ownership and permissions for the parent folder first. But the whole process doesn't require any 3rd party software, unless you want to check with Dism++ or NTLite that the drivers are all gone.

I'm uploading it here, if anyone wants to use it. Based on my short testing it works as intended, but let me know if you find any issues or if some NIC gets detected.

Some WinRE/PE/Windows versions might have an entry or two less than this file, which has 57. That's the most that I saw, using WinPE11 (I also tested with W10 RE). In the future, with updates, we'll probably have to add new ones too... It would be easier if there was a core networking component to rip out instead.
 

Attachments

  • Delete MS Network Adapters From Mounted WIM.bat
    6 KB · Views: 4

My Computer

System One

  • OS
    Windows 11
Back
Top Bottom