Jump to content

Integrating update-bf.mum with PowerShell


Recommended Posts

I'm a big fan of everything that gets achieved here, however I was running into an issue that I think will start popping up in a few places.

 

There seems to now be 4 updates for Windows 8.1 that have LDR Updates (update-bf.mum) available; Normally LDR updates can be integrated using DISM by pointing to the extracted update-bf.mum.   However I ran into some trouble attempting to integrate these updates using Add-WindowsPackage PowerShell Module.  Considering PowerShell should provide most of the DISM functions i was curious if LDR Updates are possible with Add-WindowsPackage.  Otherwise I yet to find a powershell equivalent of a couple of other functions, but that could be a discussion for another thread.

 

I am attempting to integrate the update-bf.mum from the following KB's

KB2898847KB2898850KB2931358KB2934520

I am attempting using the following powershell scripts.

######## ------- INTEGRATE UPDATES - GDR -------- ########Get-Content $INI\$EDITION-UPDATES-GDR.INI | ForEach-Object {Invoke-Expression "Write-Host -ForegroundColor Yellow 'Integrating GDR Update: $_';    Add-WindowsPackage -Path $MOUNT -LogLevel Errors -LogPath $LOGS\DISM-UPDATE-GDR.LOG -ScratchDirectory $SCRATCH -NoRestart -Verbose -PackagePath $UPDATES\$_"}######## ------- INTEGRATE UPDATES - LDR - STILL BROKE -------- ########Get-Content $INI\$EDITION-UPDATES-LDR.INI | ForEach-Object {Invoke-Expression "Write-Host -ForegroundColor Yellow 'Integrating LDR Update: $_';    Add-WindowsPackage -Path $MOUNT -LogLevel Errors -LogPath $LOGS\DISM-UPDATE-LDR.LOG -ScratchDirectory $SCRATCH -NoRestart -Verbose -PackagePath $UPDATES\$_\UPDATE-BF.MUM"}

I get the following error:

Integrating LDR Update: KB2898847VERBOSE: Dism PowerShell Cmdlets Version 6.3.0.0VERBOSE: Target Image Version 6.3.9600.17031WARNING: Failed to add package Y:\ADK\UPDATES\WINDOWS-8.1.1-AMD64\KB2898847\UPDATE-BF.MUMWARNING: Add-WindowsPackage failed. Error code = 0x80070057Add-WindowsPackage : The parameter is incorrect.At line:2 char:5+     Add-WindowsPackage -Path C:\ADK\MOUNT -LogLevel Errors -LogPath Y:\ADK\LOGS\ ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: ( [Add-WindowsPackage], PSArgumentException    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsPackageCommand

Looking at the log entries for these four updates, it appears that it is rejecting anything that is not a .cab or .msu file:

[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.2014-06-16 13:46:31, Error                 DISM   API: PID=2764 TID=2352 Package path needs to be .cab or .msu file - DismAddPackageInternal(hr:0x80070057)[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.2014-06-16 13:46:40, Error                 DISM   API: PID=2764 TID=2352 Package path needs to be .cab or .msu file - DismAddPackageInternal(hr:0x80070057)[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.2014-06-16 13:46:49, Error                 DISM   API: PID=2764 TID=2352 Package path needs to be .cab or .msu file - DismAddPackageInternal(hr:0x80070057)[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.[2764] ImageUnmarshallHandle: Reconstituting wim at Y:\ADK\SOURCES\WINDOWS-8.1.1-AMD64.WIM.2014-06-16 13:46:57, Error                 DISM   API: PID=2764 TID=2352 Package path needs to be .cab or .msu file - DismAddPackageInternal(hr:0x80070057)

Any idea if its possible to integrate LDR updates with Add-WindowsPackage?

post-43405-0-19734200-1402935230_thumb.p

Edited by splinterededge
Link to comment
Share on other sites

This command line still works of course:

######## ------- INTEGRATE UPDATES - LDR -------- ########Get-Content $INI\$EDITION-UPDATES-LDR.INI | ForEach-Object {Invoke-Expression "Write-Host -ForegroundColor Yellow 'Integrating LDR Update: $_';    DISM.EXE /$LANGUAGE /SCRATCHDIR:$SCRATCH /LOGLEVEL:1 /LOGPATH:$LOGS\DISM-UPDATE-LDR.LOG /IMAGE:$MOUNT /NORESTART /ADD-PACKAGE /PACKAGEPATH:$UPDATES\$_\UPDATE-BF.MUM"}

Thanks for listening so far, let me know if there is a method to complete this with Add-WindowsPackage

Link to comment
Share on other sites

I have substituted the DISM command-line in my script in the meantime, Im using a very simple IF statement that checks for update-bf.mum.  When update-bf.mum is detected DISM is used and when its not detected it is installed from Add-WindowsPackage like a normal GDR package.

Current LDR / GDR detection and installation

######## ------- INTEGRATE UPDATES - LDR/GDR -------- ########Get-Content $INI\$EDITION-UPDATES.INI | ForEach-Object {IF (Test-Path $UPDATES\$_\UPDATE-BF.MUM)    {        Write-Host -ForegroundColor Yellow "Integrating LDR Update: $_";        DISM.EXE /$LANGUAGE /SCRATCHDIR:$SCRATCH /LOGLEVEL:1 /LOGPATH:$LOGS\DISM-UPDATE-LDR.LOG /IMAGE:$MOUNT /NORESTART /ADD-PACKAGE /PACKAGEPATH:$UPDATES\$_\UPDATE-BF.MUM    }        ELSE    {        Write-Host -ForegroundColor Yellow "Integrating GDR Update: $_";        Add-WindowsPackage -Path $MOUNT -LogLevel Errors -LogPath $LOGS\DISM-UPDATE-GDR.LOG -ScratchDirectory $SCRATCH -NoRestart -Verbose -PackagePath $UPDATES\$_    }}

I'm still looking to confirm if a 'native' Add-WindowsPackage method exists for LDR updates.  Thanks and cheers!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...