Using DISM to Download Offline Media Feature Pack Installer for Windows 10
The DISM (Deployment Image Servicing and Management) tool is a command-line utility in Windows 10 that allows you to manage and modify the system image. One of the capabilities of DISM is to download and install Media Feature Packs offline. In this article, we will discuss how to use DISM to download and install Media Feature Packs for Windows 10.
Prerequisites
Before proceeding, ensure that you have the following:
- A valid Windows 10 installation media (ISO or WIM file)
- Microsoft Windows ADK (Assessment and Deployment Kit) installed on your system
Installing Media Feature Pack using DISM
To install a Media Feature Pack offline using DISM, follow these steps:
- Mount the Windows 10 installation media using a tool like
Disk ManagementorPowerShell. - Open an elevated command prompt and navigate to the mounted installation media.
- Run the following command to install DISM:
dism /online /enable-feature /featurename:Media.MediaFeaturePack /All /Source:C:\path\to\install.wim:1 /LimitAccessReplace
C:\path\to\install.wimwith the path to the Windows installation media WIM file. - Once the installation is complete, you can verify the installation by checking the MediaFeaturePackName key in the registry:
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Components /s MediaFeaturePackName
Modifying get-offline to download Media Feature Pack
By default, the get-offline DISM command does not download Media Feature Packs. To modify it to download the Media Feature Pack, you can create a batch script or PowerShell script that runs the DISM command with the necessary switches. Here's an example PowerShell script:
$SourcePath = "C:\path\to\install.wim"
$PackageName = "Media.MediaFeaturePack"
$DismCommand = "dism /image:$SourcePath /add-package /packagepath:Media.MediaFeaturePack.cab"
$ErrorActionPreference = "Stop"
try {
Start-Process -FilePath "C:\Windows\System32\dism.exe" `
-ArgumentList $args = @(, "/online", "/enable-feature", "/featurename", $PackageName, "/All", "/Source:$SourcePath /LimitAccess") `
-Wait -NoNewWindow
$Output = Read-Host "Press any key to continue..."
}
catch {
Write-Error "Error: $($_.Exception.Message)"
}
$ErrorActionPreference = "Continue"
if (-not (Test-Path -Path "C:\path\to\Media.MediaFeaturePack.cab")) {
Write-Error "Error: Media.MediaFeaturePack.cab not found in the installation media."
}
else {
Write-Host "Downloading Media Feature Pack..."
Start-Process -FilePath "C:\Windows\System32\dism.exe" `
-ArgumentList $args = @(, "/image:", $SourcePath, "/add-package", "/packagepath:", "Media.MediaFeaturePack.cab") `
-Wait -NoNewWindow
$Output = Read-Host "Press any key to continue..."
}
In this article, we discussed how to use DISM to download and install Media Feature Packs offline for Windows 10. We also provided an example PowerShell script to modify the get-offline DISM command to download the Media Feature Pack.