Problems Injecting Update Packages into Install.wim

Discussion in 'Windows 7' started by triggat, Nov 14, 2010.

  1. triggat

    triggat MDL Member

    Feb 18, 2009
    192
    12
    10
    #1 triggat, Nov 14, 2010
    Last edited by a moderator: Apr 20, 2017
    I have no problems injecting drivers into install.wim, but when it come to the updates or packages every single one gives the same error. Dism starts integrating them but at 20% to 30% it gives the following error "An error occurred applying the unattended .xml file from the msu package."And it happens for every single update that Dism goes through. These are updates downloaded straight from Microsoft Download Center. I tried this on two other computers with the same error occurring. Something is wrong but I can't tell what. Can you help. Thank you.
    I tried other Dism tools like Mr. Jinje's Dism tool and ELDI's GDISM tool with the same result. :confused:

    This is the command I used:

    Code:
    PAUSE
    
    MD %~dp0MOUNT
    
    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:1 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit
    
    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:2 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit
    
    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:3 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit
    
    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:4 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit
    
    REM Check for errors before closing.
    PAUSE
     
  2. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,354
    633
    60
    #2 NICK@NUMBER11, Nov 14, 2010
    Last edited: Nov 14, 2010
    This is my version used for x64 bit..

    yours state dir "x86" not "64" and also x64 versions do not have 5 index's so use mine below:

    REM This is gonna take a while.
    PAUSE

    MD %~dp0MOUNT

    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:1 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit

    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:2 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit

    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:3 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit

    Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:4 /MountDir:%~dp0MOUNT
    Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x64"
    Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x64-Drivers" /Recurse
    Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit


    REM Check for errors before closing.
    PAUSE

    Make a folder called "Update"
    then
    Make folder callled x64 - Put all the updates downloaded from Ms
    Make folder called x64-Drivers put all your drivers in this folder
    then
    place the Install.wim in "Update" folder along with the cmd (as above)
     
  3. triggat

    triggat MDL Member

    Feb 18, 2009
    192
    12
    10
    That is not the problem I used that exact same command. I made the mistake of posting the x86 cmd. I've corrected that now. The problem persists with that cmd and with other tools as I mentioned.
     
  4. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,354
    633
    60
    can you confirm your folder layouts, as i am able torun this as above with no problems 100% everytime
     
  5. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,354
    633
    60
    #5 NICK@NUMBER11, Nov 14, 2010
    Last edited: Nov 14, 2010
    here is my file and folder layouts, also do you have windows AIK installed on your pc ?
     

    Attached Files:

  6. triggat

    triggat MDL Member

    Feb 18, 2009
    192
    12
    10
    #6 triggat, Nov 14, 2010
    Last edited: Nov 15, 2010
    (OP)
    No don't have AIK installed...could this be the problem? The layout I use is the same as you sent me so I don't think it is the layout of the folders.
     
  7. triggat

    triggat MDL Member

    Feb 18, 2009
    192
    12
    10
    Where can I down load AIK (WAIK)?
     
  8. triggat

    triggat MDL Member

    Feb 18, 2009
    192
    12
    10
    #11 triggat, Nov 15, 2010
    Last edited: Nov 15, 2010
    (OP)
    Well installing Windows AIK did not help same results as before...same error. I hate this....don't know what to do next to resolve this.