Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot
    🎧 How to Download Songs on Spotify for Offline Listening (2025 Official Method)

    🎧 How to Download Songs on Spotify for Offline Listening (2025 Official Method)

    May 12, 2025
    How AI Can Help Writers Be Better

    How AI Can Help Writers Be Better

    May 6, 2025
    How to Enable Voice Chat in Roblox (Full Guide for 2025)

    How to Enable Voice Chat in Roblox (Full Guide for 2025)

    May 6, 2025
    Facebook X (Twitter) Instagram
    • About
    • Contact
    • Career
    Facebook X (Twitter) Instagram Pinterest LinkedIn WhatsApp
    Geeker Mag.
    • PC & Mobile
      1. Windows
      2. Browser
      3. Linux
      4. Office 365 & Web
      5. Hardware
      6. Mobile Apps
      7. View All
      Fix - Nvidia Driver 576.02 Black Screens & Other Issues (HOTFIX)

      Fix – Nvidia Driver 576.02 Black Screens & Other Issues (HOTFIX)

      April 22, 2025
      Windows 11 Update KB5055523 Unexpectedly Creates inetpub Folder

      Windows 11 Update KB5055523 Unexpectedly Creates inetpub Folder – Explained

      April 12, 2025
      Install Windows 11 Without a Microsoft Account (24H2/25H2)

      Install Windows 11 Without a Microsoft Account (24H2/25H2)

      April 2, 2025
      How to Restore the Old UI in Discord (Step-by-Step Guide)

      How to Restore the Old UI in Discord (Step-by-Step Guide)

      April 1, 2025
      How to Enable and Use the New Profile Manager in Firefox v138

      How to Enable and Use the New Profile Manager in Firefox v138

      April 30, 2025
      Microsoft Is Testing Copilot Integration in Edge’s New Tab Page — Here’s How to Try It

      Microsoft Is Testing Copilot Integration in Edge’s New Tab Page — Here’s How to Try It

      April 24, 2025
      How to Completely Disable Leo AI in Brave Browser (Step-by-Step Guide)

      How to Completely Disable Leo AI in Brave Browser (Step-by-Step Guide)

      April 8, 2025
      best browser for security

      9 The Best Browsers for Security and Privacy in 2025

      April 3, 2025
      Linux Security In-Depth: 5 Essential Steps You Need to Take

      Linux Security In-Depth: 5 Essential Steps You Need to Take

      May 17, 2023
      🎥 How to Create a Microsoft Account in 2025 – Watch the Step-by-Step Video

      How to Create a Microsoft Account in 2025 – Detailed Video

      May 5, 2025
      How to Delete Your Microsoft Account Permanently - 2018

      How to Delete Your Microsoft Account Permanently in 2025

      May 5, 2025
      How to Make Your Existing Microsoft Account Passwordless (Step-by-Step Guide)

      How to Make Your Existing Microsoft Account Passwordless (Step-by-Step Guide)

      May 3, 2025
      Your Subscription has been cancelled microsoft 365

      Microsoft 365 Subscription Cancelled Pop-up (Its a Bug)

      April 11, 2025
      Check for POPCNT CPU Instructions Before Installing NVIDIA Drivers to Avoid BSOD

      Check for POPCNT CPU Instructions Before Installing NVIDIA Drivers to Avoid BSOD

      August 5, 2024
      How to Check What Motherboard Do I Have in Windows 11/10

      How to Check What Motherboard Do I Have in Windows 11/10

      January 17, 2024
      8 Best SSDs for Laptops 2023 (256 GB to 2TB)

      8 Best NVMe M.2 SSD for Gaming Laptop 2023 (256 GB to 2TB)

      April 29, 2023
      best gaming graphics cards for pc

      Top 8 Graphics Cards for PC Gamers

      September 29, 2021
      Spotify AI Playlist feature.

      Is Spotify’s AI Playlist Missing or Not Showing? Here’s What You Need to Know

      April 24, 2024
      How to set Microsoft Copilot as default assistant on Android

      You can set Microsoft Copilot as Default Digital Assistance on Android

      March 5, 2024
      The Best 5 AI Photo Editing Apps of 2024

      5 Best AI Photo Editing Apps Android & iOS – 2024

      January 3, 2024
      How to View Wifi Password on Android Phone

      How to View Wifi Password on Android Phone

      October 12, 2023
      How to Fix iPhone Keyboard Lagging Issue After iOS 18 Update

      How to Fix iPhone Keyboard Lagging Issue After iOS 18 Update

      November 15, 2024
    • Internet
      1. Web Services
      2. Social Media
      3. Useful Sites
      4. G Suite
      5. View All
      How to Remove Background in Canva (Free & Pro Methods)

      How to Remove Background in Canva (Free & Pro Methods)

      April 30, 2025
      4k video downloaders failed to download youtube videos

      4K Video Downloader Failed to Download Videos (April 2025)

      April 26, 2025
      YouTube Videos Stuck at 144p? YouTube Confirms Issue

      YouTube Videos/Shorts Stuck at 144p? YouTube Confirms Issue

      March 20, 2025
      YouTube desktop new design.

      YouTube is testing a redesigned Watch Page for Desktop (Again)

      June 8, 2024
      How to Delete Instagram Account Permanently in 2023

      How to Delete Instagram Account Permanently in 2023

      October 23, 2023
      How to Create Stunning Visuals for Instagram in 2023

      How to Create Stunning Visuals for Instagram in 2023

      March 23, 2023
      How to Open Facebook app links in Chrome or Edge

      How to Open Facebook App Links in Android’s Chrome or Edge Browser

      March 8, 2022
      How to Add Music to Instagram Posts (Officially)

      How to Add Music to Your Instagram Posts (Officially)

      November 28, 2021
      5 Safe Sites to Download Rainmeter Skins in 2024

      5 Safe Sites to Download Rainmeter Skins in 2024

      January 18, 2024
      websites like thinkgeek 2019

      18 Best Websites like ThinkGeek (Alternatives ) 2024

      January 17, 2024
      best search engine for finding people online

      11 Best Free People Search Engines to Find a Person – 2024

      January 9, 2024
      best free movie streaming sites 2018

      18 Best Free Online Movie Streaming Sites 2024

      January 9, 2024
      Gmail's New "Manage Subscriptions" Feature: An Easy Way to Declutter Your Inbox

      Gmail’s New “Manage Subscriptions” Feature: An Easy Way to Declutter Your Inbox

      April 24, 2025
      help me write gmail

      How to Disable Gemini “Help Me Write” in Gmail

      January 21, 2025
      Google is sunsetting gmail

      Is Gmail Shutting Down in 2024? Truth Explained

      February 25, 2024
      Gmail @Mention Not Working - Fix 2023

      Gmail @Mention Not Working – Fix 2023

      October 6, 2023
      Vidnoz AI: Revolutionizing Video Creation with AI in 2024

      Vidnoz AI: Revolutionizing Video Creation with AI in 2024

      May 22, 2024
      How to Get Blooket Hacks in School Chromebook 2024

      How to Get Blooket Hacks in School Chromebook 2024

      January 17, 2024
      10 The Best Discord Servers to Join in 2023

      12 The Best Discord Servers to Join in 2024

      January 15, 2024
      How to Find Someone Online using their Picture

      How to Find Someone Online using their Picture

      April 5, 2023
    • Gadgets
      1. Earbuds
      2. Headphone
      3. Smartwatch
      4. Accessory
      5. View All
      TOZO Open EarRing Review: Lightweight Wireless Earbuds with Deep Bass & 40-Hour Battery

      TOZO Open EarRing Review: Lightweight Wireless Earbuds with Deep Bass & 40-Hour Battery

      October 31, 2024
      TOZO Tonal Fits T21 Wireless Earbuds Review: Big Sound, Big Battery, Budget Price

      TOZO Tonal Fits T21 Wireless Earbuds Review: Big Sound, Big Battery, Budget Price

      March 26, 2024
      TOZO T6 True Wireless Earbuds

      TOZO T6 True Wireless Earbuds, Lightweight, 45 hours battery, Wireless charging

      December 22, 2023
      TOZO T20 - True Wireless Earbuds with Wireless Charging Case

      TOZO T20 – True Wireless Earbuds with Wireless Charging Case

      October 24, 2023
      TOZO HA1 Headphones Bluetooth 5.4 and 70-Hour Battery for Under $80!

      TOZO HA1 Headphones Bluetooth 5.4 and 70-Hour Battery for Under $30

      September 10, 2024
      TOZO OpenEgo True Wireless Earbuds

      TOZO OpenEgo: True Wireless Earbuds with 30H Battery Life, Comfort Meets Hi-Fi Sound

      April 22, 2024
      Tozo HT2 Noise Cancelling Wireless Headphones

      Tozo HT2 Noise Cancelling Wireless Headphones

      December 23, 2023
      TOZO S5 Smartwatch: Round Dial, Bluetooth Fitness Tracker, Calling Features

      TOZO S5 Smartwatch: Round Dial, Bluetooth Fitness Tracker, Calling Features

      August 9, 2024
      TOZO S3 - Smartwatch Bluetooth Calling & Fitness Tracking

      TOZO S5 Smartwatch: Round Dial, Bluetooth Fitness Tracker, Calling Features

      November 17, 2023
      Clicks Blackberry Style iPhone Keyboard Case

      Clicks Game-Changing Blackberry Style iPhone Keyboard Case

      January 7, 2024
      4 Most Elegant Microsoft Surface Duo Cases and Covers

      4 Most Elegant Microsoft Surface Duo Cases and Covers

      November 19, 2020
      Tozo W1 - Fast Charging Wireless Charger for Samsung | iPhone | AnyPhone

      Tozo W1 – Fast Charging Wireless Charger for Samsung | iPhone | AnyPhone

      July 12, 2023
      Tozo C2 - The Best USB-C 65W Fast Foldable Wall Charger 2023

      Tozo C2 – The Best USB-C 65W Fast Foldable Wall Charger 2023

      July 1, 2023
    • AI
      How AI Can Help Writers Be Better

      How AI Can Help Writers Be Better

      May 6, 2025
      How to Create Ghibli Images for Free ChatGPT (No Skills Needed!)

      How to Create Ghibli Images for Free ChatGPT (No Skills Needed!)

      April 5, 2025
      deepseek login problem

      Gmail Not Receiving DeepSeek Verification Code Fix – DeepSeek Login Problem

      January 31, 2025
      Copy of USE OLD COPILOT

      How to Use Old Version of Microsoft Copilot

      December 2, 2024

      How to Generate Unlimited AI Images for Free: With This Method

      November 26, 2024
    • Gaming
      How to Enable Voice Chat in Roblox (Full Guide for 2025)

      How to Enable Voice Chat in Roblox (Full Guide for 2025)

      May 6, 2025
      🎮 How to Fix Game Share Locked Issue on PS5 (Step-by-Step Guide)

      How to Fix Game Share Locked Issue on PS5 (Step-by-Step Guide)

      April 18, 2025
      How to Fix PS5 Randomly Turning Off While Playing Games – Quick & Easy Guide

      How to Fix PS5 Randomly Turning Off While Playing Games – Quick & Easy Guide

      April 17, 2025
      How to delete roblox account

      How to Delete Roblox Account in 2025 (Four Methods)

      April 12, 2025
      Assassin’s Creed Shadows Bug: NPC Does Not Die After Assassination

      Assassin’s Creed Shadows Bug: NPC Does Not Die After Assassination

      April 3, 2025
    • More
      1. Crypto
      2. Wallpaper
      3. View All
      6 Industries that Use Cryptocurrency for Safe and Fast Transactions

      6 Industries that Use Cryptocurrency for Safe and Fast Transactions

      October 24, 2023
      Download Microsoft 50th Anniversary Wallpapers

      Download Microsoft 50th Anniversary Wallpapers

      April 6, 2025
      Windows 11 AI-themed wallpapers

      Windows 11 New Wallpapers Leaked Online (Download in high-res)

      May 20, 2024
      22 Best Rainmeter Clock Skins

      22 Beautiful Rainmeter Clock Skins for Rejuvenating Your Desktop Look

      June 1, 2021
      Microsoft Design - Download Official Backgrounds Curated by Microsoft Design Team

      Microsoft Design – Download Official Backgrounds Curated by Microsoft Design Team

      September 17, 2020
    • DONATE!
    Geeker Mag.
    Home»Windows»Fix – Windows 10 KB5034441 Fails to Install with Download Error 0x80070643
    Windows

    Fix – Windows 10 KB5034441 Fails to Install with Download Error 0x80070643

    Viney DhimanBy Viney DhimanJanuary 10, 2024Updated:July 30, 2024No Comments15 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Windows 10 KB5034441 Fails to Install with Download Error 0x80070643
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Microsoft recently rolled out KB5034441 (Windows Recovery Environment update) for Windows 10, version 21H2 and 22H2. It’s a security update that fixes the vulnerability related to Bitlocker encryption. The vulnerability could potentially allow attackers to bypass BitLocker encryption by utilizing the Windows Recovery Environment (WinRE).

    We have created a quick video walkthrough explaining the same issue embedded at the bottom of the post.

    Some users may encounter an error message during the update process indicating a lack of disk space:

    Windows Recovery Environment servicing failed.
    (CBS_E_INSUFFICIENT_DISK_SPACE)

    This error is triggered when the recovery partition on certain computers is not large enough to accommodate the WinRE update. It’s essential to address this issue promptly to complete the update successfully.

    Apart from this, there is a known issue related to error code handling, where users might encounter a different error message than the one related to disk space insufficiency. Specifically, users might see:

    0x80070643 - ERROR_INSTALL_FAILURE

    Despite this discrepancy in error messages, users should interpret this as an indication of insufficient disk space rather than a separate installation failure. The provided manual resolution instructions should still be followed to address this issue.

    Fix – Windows 10 KB5034441 Fails to Install with Error 0x80070643

    To overcome the insufficient disk space challenge and proceed with the WinRE update and fix the Windows Recovery Environment servicing failure. (CBS_E_INSUFFICIENT_DISK_SPACE) or 0x80070643 – ERROR_INSTALL_FAILURE, users can follow the provided manual instructions to resize the partition. These instructions guide users through the process of resizing their partitions to meet the update’s requirements. Following these steps diligently will ensure a successful installation.

    Microsoft has released a script to help increase the size of the recovery partition, ensuring successful updates to the Windows Recovery Environment (WinRE). It is recommended to have 250MB of free space in the recovery partition for WinRE updates.

    Here’s what you need to do:

    Grab the Script, or Download Notepad containing the script from here.

    <script>Param (
    [Parameter(Mandatory=$false,HelpMessage="Skip confirmation")][bool]$SkipConfirmation=$false,
    [Parameter(Mandatory=$true,HelpMessage="Path to backup old WinRE partition content to")][string]$BackupFolder
    )
    # ------------------------------------
    # Helper functions
    # ------------------------------------
    # Log message
    function LogMessage([string]$message)
    {
    	$message = "$message"
    	Write-Host $message
    }
    # Extract numbers from string
    function ExtractNumbers([string]$str)
    {
    	$cleanString = $str -replace "[^0-9]"
    	return [long]$cleanString
    }
    # Display partition info using fsutil
    # Return an array, the first value is total size and the second value is free space
    function DisplayPartitionInfo([string[]]$partitionPath)
    {
    	$volume = Get-WmiObject -Class Win32_Volume | Where-Object { $partitionPath -contains $_.DeviceID }
    	LogMessage("  Partition capacity: " +  $volume.Capacity)
    	LogMessage("  Partition free space: " + $volume.FreeSpace)
    	return $volume.Capacity, $volume.FreeSpace
    } 
    # Display WinRE status
    function DisplayWinREStatus()
    {
    	# Get WinRE partition info
    	$WinREInfo = Reagentc /info
    	foreach ($line in $WinREInfo)
    	{
    		$params = $line.Split(':')
    		if ($params.Count -lt 2)
    		{
    			continue
    		}
    		if (($params[1].Trim() -ieq "Enabled") -Or (($params[1].Trim() -ieq "Disabled")))
    		{
    			$Status = $params[1].Trim() -ieq "Enabled"
    			LogMessage($line.Trim())
    		}
    		if ($params[1].Trim() -like "\\?\GLOBALROOT*")
    		{
    			$Location = $params[1].Trim()
    			LogMessage($line.Trim())
    		}
    	}
    	
    	return $Status, $Location
    }
    # ------------------------------------
    # Main execution
    # ------------------------------------
    # Clear the error
    $Error.Clear()
    # ------------------------------------
    # Examining the system to collect required info 
    # for the execution
    # Need to check WinRE status, collect OS and WinRE
    # partition info
    # ------------------------------------
    LogMessage("Start time: $([DateTime]::Now)")
    LogMessage("Examining the system...")
    $NeedShrink = $true
    $NeedCreateNew = $false
    $NeedBackup = $false
    # Get WinRE partition info
    $InitialWinREStatus = DisplayWinREStatus
    $WinREStatus = $InitialWinREStatus[0]
    $WinRELocation = $InitialWinREStatus[1]
    if (!$WinREStatus)
    {
    	LogMessage("Error: WinRE Disabled")
    	exit 1
    }
    # Get System directory and ReAgent xml file
    $system32Path = [System.Environment]::SystemDirectory
    LogMessage("System directory: " + $system32Path)
    $ReAgentXmlPath = Join-Path -Path $system32Path -ChildPath "\Recovery\ReAgent.xml"
    LogMessage("ReAgent xml: " + $ReAgentXmlPath)
    if (!(Test-Path  $ReAgentXmlPath))
    {
    	LogMessage("Error: ReAgent.xml cannot be found")
    	exit 1
    }
    # Get OS partition
    LogMessage("")
    LogMessage("Collecting OS and WinRE partition info...")
    $OSDrive = $system32Path.Substring(0,1)
    $OSPartition = Get-Partition -DriveLetter $OSDrive
    # Get WinRE partition
    $WinRELocationItems = $WinRELocation.Split('\\')
    foreach ($item in $WinRELocationItems)
    {
        if ($item -like "harddisk*")
    	{
    		$OSDiskIndex = ExtractNumbers($item)
    	}
    	if ($item -like "partition*")
    	{
    		$WinREPartitionIndex = ExtractNumbers($item)
    	}
    }
    LogMessage("OS Disk: " + $OSDiskIndex)
    LogMessage("OS Partition: " + $OSPartition.PartitionNumber)
    LogMessage("WinRE Partition: " + $WinREPartitionIndex)
    $WinREPartition = Get-Partition -DiskNumber $OSDiskIndex -PartitionNumber $WinREPartitionIndex
    $diskInfo = Get-Disk -number $OSDiskIndex
    $diskType = $diskInfo.PartitionStyle
    LogMessage("Disk PartitionStyle: " + $diskType)
    # Display WinRE partition size info
    LogMessage("WinRE partition size info")
    $WinREPartitionSizeInfo = DisplayPartitionInfo($WinREPartition.AccessPaths)
    LogMessage("WinRE Partition Offset: " + $WinREPartition.Offset)
    LogMessage("WinRE Partition Type: " + $WinREPartition.Type)
    LogMessage("OS partition size: " + $OSPartition.Size)
    LogMessage("OS partition Offset: " + $OSPartition.Offset)
    $OSPartitionEnds = $OSPartition.Offset + $OSPartition.Size
    LogMessage("OS partition ends at: " + $OSPartitionEnds)
    LogMessage("WinRE partition starts at: " + $WinREPartition.Offset)
    $WinREIsOnSystemPartition = $false
    if ($diskType -ieq "MBR")
    {
    	if ($WinREPartition.IsActive)
    	{
    		LogMessage("WinRE is on System partition")
    		$WinREIsOnSystemPartition = $true
    	}
    }
    if ($diskType -ieq "GPT")
    {
    	if ($WinREPartition.Type -ieq "System")
    	{
    		LogMessage("WinRE is on System partition")
    		$WinREIsOnSystemPartition = $true
    	}
    }
    # Checking the BackupFolder parameter
    if ($PSBoundParameters.ContainsKey('BackupFolder'))
    {
    	LogMessage("")
    	LogMessage("Backup Directory: [" + $BackupFolder + "]")
    	
    	$Needbackup = $true
    	
    	if ($WinREIsOnSystemPartition)
    	{
    		$Needbackup = $false
    		LogMessage("WinRE is on System partition which will be preserved. No need to backup content")
    	}
    	else
    	{
    		if (Test-path $BackupFolder)
    		{
    			$items = Get-ChildItem -Path $BackupFolder
    			if ($items)
    			{
    				LogMessage("Error: Existing backup directory is not empty")
    				exit 1
    			}
    		}
    		else
    		{
    			LogMessage("Creating backup directory...")
    			try 
    			{
    				$item = New-Item -Path $BackupFolder -ItemType Directory -ErrorAction Stop
    				if ($item)
    				{
    					LogMessage("Backup directory created")
    				}
    				else
    				{
    					LogMessage("Error: Failed to create backup directory [" + $BackupFolder + "]")
    					exit 1
    				}
    			} catch 
    			{
    				LogMessage("Error: An error occurred: $_")
    				exit 1
    			}
    		}
    	}
    }
    # ------------------------------------
    # Verify whether we meet requirements of execution
    # - WinRE cannot be on OS partition for the extension
    # - WinRE partition must be the next partition after OS partition
    # - If WinRE partition already have >=250MB free space, no need to do repartition
    # - If there is enough unallocated space to grow the WinRE partition size, skip shrinking OS
    # 
    # However, if the WinRE partition is before the OS partition, there is no chance to extend it
    # As a result, it's better to create a new WinRE partition after the OS partition
    # ------------------------------------
    # Perform a few checks
    LogMessage("")
    LogMessage("Verifying if the WinRE partition needs to be extended or not...")
    if (!(($diskType -ieq "MBR") -Or ($diskType -ieq "GPT")))
    {
    	LogMessage("Error: Got an unexpected disk partition style: " +$diskType)
    	exit 1
    }
    # WinRE partition must be after OS partition for the repartition
    if ($WinREPartitionIndex -eq $OSPartition.PartitionNumber)
    {
    	LogMessage("WinRE and OS are on the same partition, should not perform extension")
    	exit 0
    }
    $supportedSize = Get-PartitionSupportedSize -DriveLetter $OSDrive
    # if there is enough free space, skip extension
    if ($WinREPartitionSizeInfo[1] -ge 250MB)
    {
    	LogMessage("More than 250 MB of free space was detected in the WinRE partition, there is no need to extend the partition")
    	exit 0
    }
    if ($WinREPartition.Offset -lt $OSPartitionEnds)
    {
    	LogMessage("WinRE partition is not after OS partition, cannot perform extension")
    	LogMessage("Need to create a new WinRE partition after OS partition")
    	$NeedCreateNew = $true
    	$NeedShrink = $true
    	
    	# Calculate the size of repartition
    	# Will create a new WinRE partition with current WinRE partition size + 250 MB
    	# The OS partition size will be shrunk by the new WinRE partition size
    	$targetWinREPartitionSize = $WinREPartitionSizeInfo[0] + 250MB
    	$shrinkSize = [Math]::Ceiling($targetWinREPartitionSize / 1MB) * 1MB
    	$targetOSPartitionSize = $OSPartition.Size - $shrinkSize
    	if ($targetOSPartitionSize -lt $supportedSize.SizeMin)
    	{
    		LogMessage("Error: The target OS partition size after shrinking is smaller than the supported minimum size, cannot perform the repartition")
    		exit 1
    	}
    }
    else
    {
    	if ($WinREIsOnSystemPartition)
    	{
    		LogMessage("WinRE parititon is after the OS partition and it's also System partition")
    		LogMessage("Error: Got unexpected disk layout, cannot proceed")
    		exit 1
    	}
    	if (!($WinREPartitionIndex -eq ($OSPartition.PartitionNumber + 1)))
    	{
    		LogMessage("Error: WinRE partition is not right after the OS partition, cannot extend WinRE partition")
    		exit 1
    	}
    	# Calculate the size of repartition
    	# Will shrink OS partitition by 250 MB
    	$shrinkSize = 250MB
    	$targetOSPartitionSize = $OSPartition.Size - $shrinkSize
    	$targetWinREPartitionSize = $WinREPartitionSizeInfo[0] + 250MB
    	$UnallocatedSpace = $WinREPartition.Offset - $OSPartitionEnds;
    	# If there is unallocated space, consider using it
    	if ($UnallocatedSpace -ge 250MB)
    	{
    		$UnallocatedSpace = $WinREPartition.Offset - $OSPartitionEnds;
    		LogMessage("Found unallocated space between OS and WinRE partition: " + $UnallocatedSpace)
    		LogMessage("There is already enough space to extend WinRE partition without shrinking the OS partition")
    		$NeedShrink = $false
    		$targetOSPartitionSize = 0
    	}
    	else
    	{
    		$shrinkSize = [Math]::Ceiling((250MB - $UnallocatedSpace)/ 1MB) * 1MB
    		if ($shrinkSize > 250MB)
    		{
    			$shrinkSize = 250MB
    		}
    		$targetOSPartitionSize = $OSPartition.Size - $shrinkSize
    		if ($targetOSPartitionSize -lt $supportedSize.SizeMin)
    		{
    			LogMessage("Error: The target OS partition size after shrinking is smaller than the supported minimum size, cannot perform the repartition")
    			exit 1
    		}
    	}
    }
    # ------------------------------------
    # Report execution plan and ask for user confirmation to continue
    # ------------------------------------
    # Report the changes planned to be executed, waiting for user confirmation
    LogMessage("")
    LogMessage("Summary of proposed changes")
    if ($NeedCreateNew)
    {
    	LogMessage("Note: WinRE partition is before OS partition, need to create a new WinRE partition after OS partition")
    	LogMessage("Will shrink OS partition by " + $shrinkSize)
    	LogMessage("  Current OS partition size: " + $OSPartition.Size)
    	LogMessage("  Target OS partition size after shrinking: " + $targetOSPartitionSize)
    	LogMessage("New WinRE partition will be created with size: ", $targetWinREPartitionSize)
    	if ($WinREIsOnSystemPartition)
    	{
    		LogMessage("Existing WinRE partition is also system partition, it will be preserved")
    	}
    	else
    	{
    		LogMessage("Existing WinRE partition will be deleted")
    		LogMessage("  WinRE partition: Disk [" + $OSDiskIndex + "] Partition [" + $WinREPartitionIndex + "]")
    		LogMessage("  Current WinRE partition size: " + $WinREPartitionSizeInfo[0])
    	}
    }
    else
    {
    	if ($NeedShrink)
    	{
    		LogMessage("Will shrink OS partition by " + $shrinkSize)
    		LogMessage("  Current OS partition size: " + $OSPartition.Size)
    		LogMessage("  Target OS partition size after shrinking: " + $targetOSPartitionSize)
    		if ($UnallocatedSpace -ge 0)
    		{
    			LogMessage("Unallocated space between OS and WinRE partition that will be used towards the new WinRE partition: " + $UnallocatedSpace)
    		}
    	}
    	else
    	{
    		LogMessage("Will use 250MB from unallocated space between OS and WinRE partition")
    	}
    	LogMessage("Will extend WinRE partition size by 250MB")
    	LogMessage("  WinRE partition: Disk [" + $OSDiskIndex + "] Partition [" + $WinREPartitionIndex + "]")
    	LogMessage("  Current WinRE partition size: " + $WinREPartitionSizeInfo[0])
    	LogMessage("  New WinRE partition size:     " + $targetWinREPartitionSize)
    	LogMessage("WinRE will be temporarily disabled before extending the WinRE partition and enabled automatically in the end")
    	if ($UnallocatedSpace -ge 100MB)
    	{
    		LogMessage("Warning: More than 100MB of unallocated space was detected between the OS and WinRE partitions")
    		LogMessage("Would you like to proceed by using the unallocated space between the OS and the WinRE partitions?")
    	}
    }
    if ($Needbackup)
    {
    	LogMessage("")
    	LogMessage("The contents of the old WinRE partition will be backed up to [" + $BackupFolder + "]")
    }
    LogMessage("")
    LogMessage("Please reboot the device before running this script to ensure any pending partition actions are finalized")
    LogMessage("")
    if ($SkipConfirmation)
    {
    	LogMessage("User chose to skip confirmation")
    	LogMessage("Proceeding with changes...")
    }
    else
    {
    	$userInput = Read-Host -Prompt "Would you like to proceed? Y for Yes and N for No"
    		
    	if ($userInput -ieq "Y")
    	{
    		LogMessage("Proceeding with changes...")
    	}
    	elseif ($userInput -ieq "N")
    	{
    		LogMessage("Canceling based on user request, no changes were made to the system")
    		exit 0
    	}
    	else
    	{
    		LogMessage("Error: Unexpected user input: [" + $userInput + "]") 
    		exit 0
    	}
    }
    LogMessage("")
    LogMessage("Note: To prevent unexpected results, please do not interrupt the execution or restart your system")
    # ------------------------------------
    # Do the actual execution
    # The main flow is:
    # 1. Check whether ReAgent.xml has stage location and clear it for repartiion
    # 2. Disable WinRE as WinRE partition will be deleted
    # 3. Perform the repartition to create a larger WinRE partition
    # 4. Re-enable WinRE
    # ------------------------------------
    LogMessage("")
    # Load ReAgent.xml to clear Stage location
    LogMessage("Loading [" + $ReAgentXmlPath + "] ...")
    $xml = [xml](Get-Content -Path $ReAgentXmlPath)
    $node = $xml.WindowsRE.ImageLocation
    if (($node.path -eq "") -And ($node.guid -eq "{00000000-0000-0000-0000-000000000000}") -And ($node.offset -eq "0") -And ($node.id -eq "0"))
    {
    	LogMessage("Stage location info is empty")
    }
    else
    {
    	LogMessage("Clearing stage location info...")
    	$node.path = ""
    	$node.offset = "0"
    	$node.guid= "{00000000-0000-0000-0000-000000000000}"
    	$node.id="0"
    	# Save the change
    	LogMessage("Saving changes to [" + $ReAgentXmlPath + "]...")
    	$xml.Save($ReAgentXmlPath)
    }
    # Disable WinRE
    LogMessage("Disabling WinRE...")
    reagentc /disable
    if (!($LASTEXITCODE -eq 0))
    {
    	LogMessage("Warning: encountered an error when disabling WinRE: " + $LASTEXITCODE)
    	exit $LASTEXITCODE
    }
    # Verify WinRE is under C:\Windows\System32\Recovery\WinRE.wim
    $disableWinREPath = Join-Path -Path $system32Path -ChildPath "\Recovery\WinRE.wim"
    LogMessage("Verifying that WinRE wim exists in downlevel at default location")
    if (!(Test-Path $disableWinREPath))
    {
    	LogMessage("Error: Cannot find " + $disableWinREPath)
    	
    	# Re-enable WinRE
    	LogMessage("Re-enabling WinRE on error...")
    	reagentc /enable
    	if (!($LASTEXITCODE -eq 0))
    	{
    		LogMessage("Warning: encountered an error when enabling WinRE: " + $LASTEXITCODE)
    	}
    	exit 1
    }
    # ------------------------------------
    # Perform the repartition
    # 1. Resize the OS partition
    # 2. Delete the WinRE partition
    # 3. Create a new WinRE partition
    # ------------------------------------
    LogMessage("Performing repartition to extend the WinRE partition ...")
    # 1. Resize the OS partition
    if ($NeedShrink)
    {
    	LogMessage("Shrinking the OS partition to create a larger WinRE partition")
    	LogMessage("Resizing the OS partition to: [" + $targetOSPartitionSize + "]...")
    	Resize-Partition -DriveLetter $OSDrive -Size $targetOSPartitionSize
    	if ($Error.Count -gt 0) {
    		LogMessage("Error: Resize-Partition encountered errors: " + $Error[0].Exception.Message)
    		
    		# Re-enable WinRE
    		LogMessage("Re-enabling WinRE on error...")
    		reagentc /enable
    		if (!($LASTEXITCODE -eq 0))
    		{
    			LogMessage("Warning: encountered an error when enabling WinRE: " + $LASTEXITCODE)
    		}
    		exit 1
    	}
    	$OSPartitionAfterShrink = Get-Partition -DriveLetter $OSDrive
    	LogMessage("Target partition size: " + $targetOSPartitionSize)
    	LogMessage("Size of OS partition after shrinking: " + $OSPartitionAfterShrink.Size)
    }
    # 2. Delete the WinRE partition
    LogMessage("")
    if ($WinREIsOnSystemPartition)
    {
    	LogMessage("Existing WinRE partition is System partition, skipping deletion")
    }
    else
    {	
    	# If requested by user, backup rest of the content on WinRE partition to backup directory
    	if ($Needbackup)
    	{
    		$sourcePath = $WinREPartition.AccessPaths[0] 
    		LogMessage("Copying content on WinRE partition from [" + $sourcePath + "] to [" + $BackupFolder + "]...")
    		
    		# Copy-Item may have access issue with certain system folders, enumerate the children items and exlcude them
    		$items = Get-ChildItem -LiteralPath $sourcePath -Force
    		foreach ($item in $items)
    		{
    			if ($item.Name -ieq "System Volume Information")
    			{
    				continue
    			}
    			$sourceItemPath = Join-Path -Path $sourcePath -ChildPath $item.Name
    			$destItemPath = Join-Path -Path $BackupFolder -ChildPath $item.Name
    			try 
    			{
    				LogMessage("Copying [" + $sourceItemPath + "] to [" + $destItemPath + "]...")
    				Copy-Item -LiteralPath $sourceItemPath -Destination $destItemPath -Recurse -Force
    			} catch 
    			{
    				LogMessage("Error: An error occurred during copy: $_")
    				exit 1
    			}
    		}
    		
    		LogMessage("Backup completed")
    		LogMessage("")
    	}
    	LogMessage("Deleting WinRE partition: Disk [" + $OSDiskIndex + "] Partition [" + $WinREPartitionIndex + "]...")
    	Remove-Partition -DiskNumber $OSDiskIndex -PartitionNumber $WinREPartitionIndex -Confirm:$false
    	if ($Error.Count -gt 0) {
    		LogMessage("Error: Remove-Partition encountered errors: " + $Error[0].Exception.Message)
    		exit 1
    	}
    }
    # A short sleep for the partition change
    Sleep 5
    # 3. Create a new WinRE partition
    LogMessage("")
    LogMessage("Creating new WinRE partition...")
    LogMessage("Target size: " + $targetWinREPartitionSize)
    if ($diskType -ieq "GPT")
    {
    	$partition = New-Partition -DiskNumber $OSDiskIndex -Size $targetWinREPartitionSize -GptType "{de94bba4-06d1-4d40-a16a-bfd50179d6ac}"
    	
    	$newPartitionIndex = $partition.PartitionNumber
    	# A short sleep to make sure the partition is ready for formatting
    	Sleep 2
    	LogMessage("Formating the partition...")
    	$result = Format-Volume -Partition $partition -FileSystem NTFS -Confirm:$false
    	if ($Error.Count -gt 0) {
    		LogMessage("Error: Format-Volume encountered errors: " + $Error[0].Exception.Message)
    		exit 1
    	}
    }
    else
    {
    	#$partition = New-Partition -DiskNumber $OSDiskIndex -Size $targetWinREPartitionSize -MbrType 0x27
    	$targetWinREPartitionSizeInMb = [int]($targetWinREPartitionSize/1MB)
    	$diskpartScript = 
    @"
    select disk $OSDiskIndex
    create partition primary size=$targetWinREPartitionSizeInMb id=27
    format quick fs=ntfs label="Recovery"
    set id=27
    "@
    	$TempPath = $env:Temp
    	$diskpartSciptFile = Join-Path -Path $TempPath -ChildPath "\ExtendWinRE_MBR_PowershellScript.txt"
    	
    	LogMessage("Creating temporary diskpart script to create Recovery partition on MBR disk...")
    	LogMessage("Temporary diskpart script file: " + $diskpartSciptFile)
    	$diskpartScript | Out-File -FilePath $diskpartSciptFile -Encoding ascii
    	
    	LogMessage("Executing diskpart script...")
    	try 
    	{
    		$diskpartOutput = diskpart /s $diskpartSciptFile
    		
    		if ($diskpartOutput -match "DiskPart successfully") 
    		{
    			LogMessage("Diskpart script executed successfully")
    		}
    		else
    		{
    			LogMessage("Error executing diskpart script:" + $diskpartOutput)
    			exit 1
    		}
    		LogMessage("Deleting temporary diskpart script file...")
    		Remove-Item $diskpartSciptFile
    	}
    	catch 
    	{
    		LogMessage("Error executing diskpart script: $_")
    		exit 1
    	}
    	
    	$vol = Get-Volume -FileSystemLabel "Recovery"
    	$newPartitionIndex = (Get-Partition | Where-Object { $_.AccessPaths -contains $vol.Path } ).PartitionNumber
    }
    if ($Error.Count -gt 0) 
    {
    	LogMessage("Error: New-Partition encountered errors: " + $Error[0].Exception.Message)
    	exit 1
    }
    LogMessage("New Partition index: " + $newPartitionIndex)
    # Re-enable WinRE
    LogMessage("Re-enabling WinRE...")
    reagentc /enable
    if (!($LASTEXITCODE -eq 0))
    {
    	LogMessage("Warning: encountered an error when enabling WinRE: " + $LASTEXITCODE)
    	exit $LASTEXITCODE
    }
    # In the end, Display WinRE status to verify WinRE is enabled correctly
    LogMessage("")
    LogMessage("WinRE Information:")
    $FinalWinREStatus = DisplayWinREStatus
    $WinREStatus = $FinalWinREStatus[0]
    $WinRELocation = $FinalWinREStatus[1]
    if (!$WinREStatus)
    {
    	LogMessage("Warning: WinRE Disabled")
    }
    $WinRELocationItems = $WinRELocation.Split('\\')
    foreach ($item in $WinRELocationItems)
    {
    	if ($item -like "partition*")
    	{
    		$WinREPartitionIndex = ExtractNumbers($item)
    	}
    }
    LogMessage("WinRE Partition Index: " + $WinREPartitionIndex)
    $WinREPartition = Get-Partition -DiskNumber $OSDiskIndex -PartitionNumber $WinREPartitionIndex
    $WinREPartitionSizeInfoAfter = DisplayPartitionInfo($WinREPartition.AccessPaths)
    LogMessage("")
    LogMessage("OS Information:")
    $OSPartition = Get-Partition -DriveLetter $OSDrive
    LogMessage("OS partition size: " + $OSPartition.Size)
    LogMessage("OS partition Offset: " + $OSPartition.Offset)
    if (!($WinREPartitionIndex -eq $newPartitionIndex))
    {
    	LogMessage("Warning: WinRE is installed to partition [" + $WinREPartitionIndex +"], but the newly created Recovery partition is [" + $newPartitionIndex + "]")
    }
    LogMessage("End time: $([DateTime]::Now)")
    if ($NeedBackup)
    {
    	LogMessage("")
    	LogMessage("The contents of the old WinRE partition has been backed up to [" + $BackupFolder + "]")
    }
    LogMessage("")
    LogMessage("Successfully completed the operation") </script>

    In the C drive, you need to create a new folder to create a backup of this process which the script may use in case of failure to restore the original partition. I will name it backup.

    Run Windows Powershell as administrator. When the UAC dialog box appears click yes to continue.

    In the Powershell Window, you need to copy-paste the above script and hit enter.

    Windows 10 KB5034441 Fails to Install with Download Error 0x80070643

    Now you will be asked to enter the location of the backup of the process, simply type c:\(name of backup folder). In my case, it’s c:\backup. After typing hit enter.

    Windows 10 KB5034441 Fails to Install with Download Error 0x80070643

    The script will start collecting the OS data and check if your device need winRe partition or not.

    Windows 10 KB5034441 Fails to Install with Download Error 0x80070643

    Once you reach here, type Y to continue. This will execute the script.

    Windows 10 KB5034441 Fails to Install with Download Error 0x80070643

    What this will do is increase the size of the WinRE partition to 250 MB, which is suggested by Microsoft for the proper installation of this update.

    The process will take a few seconds.

    After you see the status “Successfully completed the operation“.

    Windows 10 KB5034441 Fails to Install with Download Error 0x80070643

    Close Powershell and restart your computer.

    Now head over to the Windows Update settings page and this time you should be able to install the KB5034441 update without any issue.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleFix – Lenovo Camera Not Working in Windows 11/10 in (2024)
    Next Article Fix – Error Code: DLG_FLAGS_INVALID_CA in Windows 11/10 (Edge and other )
    Viney Dhiman
    • Website
    • Facebook
    • X (Twitter)
    • Instagram
    • LinkedIn

    Viney Dhiman, the mind behind GeekerMag, is a seasoned content writer with over 12 years of experience. Specializing in simplifying complex tech concepts, he covers Windows OS, Android, iOS, web apps, and product reviews. His work can be found on popular tech websites like Gizmodo and The Verge, and he has been interviewed by the Microsoft Edge team.

    Related Posts

    Fix - Nvidia Driver 576.02 Black Screens & Other Issues (HOTFIX)
    Windows

    Fix – Nvidia Driver 576.02 Black Screens & Other Issues (HOTFIX)

    April 22, 2025
    Windows 11 Update KB5055523 Unexpectedly Creates inetpub Folder
    Windows

    Windows 11 Update KB5055523 Unexpectedly Creates inetpub Folder – Explained

    April 12, 2025
    Install Windows 11 Without a Microsoft Account (24H2/25H2)
    Windows

    Install Windows 11 Without a Microsoft Account (24H2/25H2)

    April 2, 2025
    Add A Comment

    Comments are closed.

    Trending Posts
    How AI Can Help Writers Be Better

    How AI Can Help Writers Be Better

    May 6, 2025
    How to Enable Voice Chat in Roblox (Full Guide for 2025)

    How to Enable Voice Chat in Roblox (Full Guide for 2025)

    May 6, 2025
    🎥 How to Create a Microsoft Account in 2025 – Watch the Step-by-Step Video

    How to Create a Microsoft Account in 2025 – Detailed Video

    May 5, 2025
    How to Delete Your Microsoft Account Permanently - 2018

    How to Delete Your Microsoft Account Permanently in 2025

    May 5, 2025
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    Most Popular
    Fix - Lenovo Camera Not Working in Windows 11/10 in (2024)

    Fix – Lenovo Camera Not Working in Windows 11/10 in (2024)

    January 10, 2024
    How to Disable Incognito Mode of Chrome in Windows 10 - 2020

    How to Turn Off and Disable Google Chrome Incognito Mode in Windows 11/10

    February 10, 2020
    Error Code: DLG_FLAGS_INVALID_CA (Explained | Resolved)

    Fix – Error Code: DLG_FLAGS_INVALID_CA in Windows 11/10 (Edge and other )

    January 10, 2024
    Our Picks
    🎧 How to Download Songs on Spotify for Offline Listening (2025 Official Method)

    🎧 How to Download Songs on Spotify for Offline Listening (2025 Official Method)

    May 12, 2025
    How AI Can Help Writers Be Better

    How AI Can Help Writers Be Better

    May 6, 2025
    How to Enable Voice Chat in Roblox (Full Guide for 2025)

    How to Enable Voice Chat in Roblox (Full Guide for 2025)

    May 6, 2025

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram Pinterest WhatsApp Telegram
    • Privacy Policy
    • TOC
    • Corrections Policy
    • Editorial Guidelines
    • Fact Checking Policy
    © 2025 Geeker Mag. | Maintained by Viney Dhiman.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.