Last active
May 22, 2016 11:33
-
-
Save timbodv/e9a2541d896427573ae8e9d0e3b94e36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # KB3125574 Convenience rollup update for Windows 7 SP1 and Windows Server 2008 R2 SP1 (https://support.microsoft.com/en-us/kb/3125574) | |
| $pathToInstallWim = 'c:\temp\install.wim' | |
| $pathToMountFolder = 'c:\temp\mount' | |
| $pathToPatches = 'c:\temp\patches' | |
| $patches = 'Windows6.1-KB3020369-x64', # servicing update | |
| 'windows6.1-kb3125574-v4-x64', # convenience update | |
| 'Windows6.1-KB3138612-x64.msu', # help Windows Update work faster | |
| 'Windows6.1-KB3145739-x64.msu', # help Windows Update work faster | |
| 'Windows6.1-KB3153199-x64.msu' # help Windows Update work faster | |
| Start-Process -ArgumentList "/Mount-WIM /WimFile:""$pathToInstallWim"" /index:1 /MountDir:""$pathToMountFolder""" -FilePath 'dism.exe' -Wait -NoNewWindow | |
| foreach ($patch in $patches) { | |
| Start-Process -ArgumentList "/Image:""$pathToInstallWim"" /Add-Package /PackagePath:""$pathToPatches\$($patch).msu""" -FilePath 'dism.exe' -Wait -NoNewWindow | |
| } | |
| Start-Process -ArgumentList "/Unmount-WIM /MountDir:""$pathToMountFolder"" /Commit" -FilePath 'dism.exe' -Wait -NoNewWindow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment