Windows Integration Guide - murphy78

Discussion in 'Windows 8' started by murphy78, Sep 5, 2013.

  1. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,426
    11,724
    240
    Fixed this. The problem was that when I was multiboot setup'ing I was removing the drive letter assignment on the 'W' or Windows Drive.
    When you do bcdboot, it checks for current drives to find compatible boot options and configures settings, but they have to have a drive letter.
    I'll re-assign my windows letter to Z: to give the maximum possible allowance of windows multi-boots without failing the check for online drives.

    Lessee if you disable the first winre movement and don't use the recovery partition option, that gives you 2 initial uefi partitions.
    Minus the 2 floppy drives and a dvd or usb to install, that gives you 21 boot options.

    Obviously I don't recommend using that many windows installs, but it's nice to have options...
    I'll change the letter and re-test everything just to make sure it works correctly then upload my project.
    I'm not gonna test doing 21 installs, that's just crazy... If you wanna do that... be my guest.

    Still tho.. having a vm with tons of different Windows versions installed to help with tech support would be helpful.
    Of course you could just make a bunch of different vms...

    If testing goes well it could probably go up tonight... if not, perhaps tomorrow.
    I'll probably make it its own thread since there's so much to it.
     
  2. hellowasif

    hellowasif Guest

    If u want a tester for testing i will love to test new project :p
     
  3. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,426
    11,724
    240
    Spent the last half a day chasing a white rabbit.
    Apparently win7 doesn't like to use recovery image restoration while in uefi mode. It gives a bogus x:\sources\install.wim not found error.
    However, it works fine in bios boot. It could be the vmware nvram or some vmware setting.
    I'm going to see if I can verify this with a stock win7 x64 ult iso in UEFI boot.

    If it gives the same error I think I'll just warn users against using win7 UEFI mode + recovery image partition.
    To be fair it could also be a problem with vmware workstation not being set to win7 mode or something.
    I'll test that as well. But basically my project is ready to go. I've done a few minor error handlings such as making sure no number inputs had non-numbers added,
    made sure all the various driver adds worked, checked all the different things..

    So basically this last day I've been fixing bugs and getting stuck on this win7 recovery osimage issue, but I'll test a few more ideas that I already mentioned and up it either later tonight or early tomorrow.
    I would up it without finishing the testing, but these things tend to spread throughout the web fairly quickly sometimes and I'd hate to have a bunch of people blaming me for a broken script that I knew wasn't working like it should when I upped it. Plus I'll have to do all the writeups with image spoilers and junk... It's just gonna take a while when I'm done to do that post.

    And no, this is not going to be some April1 joke or something. I don't particularly care for pranks.
     
  4. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,426
    11,724
    240
    Well when I'm done with the script, you're more than welcome to use the hell out of it however you feel like and give feedback if you desire.
    Scripting bugs aren't really things you can have other people test. I mean, there's not a whole lot to the script. Most of the testing I'm doing involves letting it install, checking to see if a recovery OS works or not, and slightly modifying script and trying again. To be honest, I don't think I'm doing anything wrong with the script at this point. At this point it's either some sort of vmware compatibility issue or perhaps it just doesn't work properly in uefi boot with a vm. The recovery OS image I mean. Everything else works fine; and it's just win7 that doesn't work...

    Sorry I'm rambling. This damn error has driven me crazy the last 12 hours or so.
    Off to sleep. thx tho bud.
     
  5. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,398
    340
    Even wanted to ask if you're sleeping from time to time :D.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,013
    966
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. FaiKee

    FaiKee Misinformation spreader

    Jul 24, 2009
    4,303
    5,816
    150
    That's what MS guys did:

    Last time I addpackages with /preventpending switch, KB2919355 became a foundation package and not installed, but then there was no pending.xml and I could cleanup image, resulting in a 3.8GB wim.

    And this is the MSDN wim:

    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>Dism /Online /Get-Packages

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Image Version: 6.3.9600.17031

    Packages listing:

    Package Identity : Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e3
    5~amd64~en-US~6.3.9600.16384
    State : Installed
    Release Type : Language Pack
    Install Time : 3/18/2014 9:32 AM

    Package Identity : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~
    6.3.9600.16384
    State : Installed
    Release Type : Foundation
    Install Time : 8/22/2013 2:46 PM

    Package Identity : Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14
    State : Installed
    Release Type : Update
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2919442~31bf3856ad364e35~amd64~~6.3.1.8
    State : Installed
    Release Type : Update
    Install Time : 3/18/2014 9:57 AM

    Package Identity : Package_for_KB2932046~31bf3856ad364e35~amd64~~6.3.1.5
    State : Installed
    Release Type : Feature Pack
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2937220~31bf3856ad364e35~amd64~~6.3.1.0
    State : Installed
    Release Type : Update
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2937592~31bf3856ad364e35~amd64~~6.3.1.0
    State : Installed
    Release Type : Feature Pack
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2938439~31bf3856ad364e35~amd64~~6.3.1.0
    State : Installed
    Release Type : Feature Pack
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2938772~31bf3856ad364e35~amd64~~6.3.1.0
    State : Installed
    Release Type : Update
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2939471~31bf3856ad364e35~amd64~~6.3.1.0
    State : Installed
    Release Type : Update
    Install Time : 3/18/2014 10:36 AM

    Package Identity : Package_for_KB2949621~31bf3856ad364e35~amd64~~6.3.2.0
    State : Installed
    Release Type : Hotfix
    Install Time : 3/18/2014 10:36 AM

    The operation completed successfully.

    C:\Windows\system32>​
     
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,253
    91,028
    340
    #388 abbodi1406, Apr 3, 2014
    Last edited by a moderator: Apr 20, 2017
    The new refreshed iso is made just like GA Pro/Enterprise.. Add-Packages, Boot audit, Cleanup, Sysprep, Capture :D
    to be sure, could you run this and report the Remaining rearm count? :)
    Code:
    cscript slmgr.vbs /dlv
     
  9. FaiKee

    FaiKee Misinformation spreader

    Jul 24, 2009
    4,303
    5,816
    150
    #389 FaiKee, Apr 3, 2014
    Last edited by a moderator: Apr 20, 2017
    Sorry man, this was from a PCBeta guy, maybe some MDL guys will post it? :D
     
  10. ajua

    ajua MDL Junior Member

    Feb 17, 2008
    57
    7
    0
    I add my MSU files to WSIM and save them as an XML file for use with pkgmgr. Can this be done withe Update 1 MSU's? I can't use a VM so I will try it on a laptop but wanted to know before I finish downloading the update and use that method of integration.

    Thanks.
     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,253
    91,028
    340
    #391 abbodi1406, Apr 3, 2014
    Last edited by a moderator: Apr 20, 2017
    from ADK help file:
    Code:
    Known limitation: You can't add these updates all at once using an Unattend file. These packages must be added one at a time.
    this is the guide from it also, but it needs some adjustments:
    Code:
    =================================================================
    Install the Windows 8.1 Update 
    =================================================================
    Windows 8.1 Update is available as three update files:
    Windows 8.1 Update prerequisite (KB2919442)
    Windows 8.1 Update (KB2919355)
    Windows 8.1 Update Supplement package (KB2932046)
    Windows 8.1 Update Supplement 2 package (KB2937592)
    
    These three update files include a rollup of all of the updates released between Windows 8.1 RTM and Windows 8.1 Update.
    
    =================================================================
    Start with your customized Windows 8.1 RTM image with updates and language packs installed
    =================================================================
    1. Start with your installation of Windows 8.1 RTM. This can be a base language image or an image with multiple languages.
    2. Install one or more Windows 8.1 RTM languages to the image, if necessary.
    
    =================================================================
    Update the Windows image
    =================================================================
    1. Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator. 
    2. Create a mount directory for your Windows image (install.wim), and then mount the image.
    md C:\mount\Windows
    Dism /Mount-Image /ImageFile:"C:\Images\install.wim" /Index:1 /MountDir:C:\mount\Windows
    3. Update your Windows images with the Windows 8.1 Update .MSU files, in this order:
    Windows8.1-KB2919442-<arch>.msu
    Windows8.1-KB2919355-<arch>.msu
    Windows8.1-KB2932046-<arch>.msu
    Windows8.1-KB2937592-<arch>.msu
    Where <arch> is x86, x64, or arm. For example:
    Dism /Image:C:\mount\Windows /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2919442-x64.msu
    Dism /Image:C:\mount\Windows /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2919355-x64.msu
    Dism /Image:C:\mount\Windows /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2932046-x64.msu
    Dism /Image:C:\mount\Windows /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2937592-x64.msu
    Note:
    Known limitation: You can't add these files all at once using an Unattend file. These packages must be added one at a time.
    
    =================================================================
    Update the Windows RE image
    =================================================================
    1. Create a mount directory for your Windows RE image (winre.wim), and then mount the image.
    md C:\mount\WinRE
    Dism /Mount-Image /ImageFile:"C:\mount\Windows\Windows\System32\Recovery\winre.wim" /Index:1 /MountDir:C:\mount\WinRE
    2. Update your Windows RE images with the Windows 8.1 Update .MSU files. These are the same MSU files used to update the Windows images, and they should be updated in the same order.
    Dism /Image:C:\mount\WinRE /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2919442-x64.msu
    Dism /Image:C:\mount\WinRE /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2919355-x64.msu
    Dism /Image:C:\mount\WinRE /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2932046-x64.msu
    Dism /Image:C:\mount\WinRE /Add-Package /PackagePath:C:\MSU\Windows8.1-KB2937592-x64.msu
    3. Recommended: Clean up the Windows RE image. Use /StartComponentCleanup to clean up the superseded components and reduce the size of the component store.
    Use /ResetBase to reset the base of superseded components, which can further reduce the component store size.
    To see the file size reduction, you'll need to either recapture or export the image.
    Dism /Image:C:\mount\WinRE /Cleanup-Image /StartComponentCleanup /ResetBase
    Note:
    You won't be able to clean up your Windows image until after you've booted it.
    4. Unmount the Windows RE image.
    Dism /Unmount-Image /MountDir:C:\mount\WinRE /Commit
    5. Recommended: Export the image. After cleaning the image with Dism /Cleanup-Image, you'll need to either recapture the image or export it into a new file to see the reduction in file size.
    Dism /Export-Image /SourceImageFile:C:\mount\Windows\Windows\System32\Recovery\winre.wim /SourceIndex:1 /DestinationImageFile:C:\Images\winre_updated.wim
    Replace the winre.wim file in the Windows image with the newly-exported image.
    Del C:\mount\Windows\Windows\System32\Recovery\winre.wim
    copy C:\Images\winre_updated.wim C:\mount\Windows\Windows\System32\Recovery\winre.wim
    Recommended: keep a copy of this updated Windows RE image file, because this file can be useful for other deployment methods, for example, creating quick versions of WIMBoot images.
    
    =================================================================
    Unmount the Windows image
    =================================================================
    Unmount the Windows image:
    Dism /Unmount-Image /MountDir:C:\mount\Windows /Commit
    
    =================================================================
    Recommended: Boot the image to allow the updates to apply and to clean up the image
    =================================================================
    1. On your reference PC, install or apply your Windows image, and boot the PC.
    2. Press CTRL+SHIFT+F3 at the OOBE screens to enter audit mode.
    3. Recommended: Clean up the Windows image. Open a command prompt window, and type this:
    Dism /Cleanup-Image /Online /StartComponentCleanup /ResetBase
    4. Use Sysprep to generalize and shut down the PC.
    C:\Windows\System32\Sysprep\sysprep /generalize /shutdown /oobe
    5. Boot the PC to a Ready Windows PE 5.1. If the PC starts rebooting to Windows, you'll need to let it finish booting and then use Sysprep to generalize and shut down the PC again.
    6. Recommended: Create a temporary scratch directory for DISM on a physical drive, rather than the default Windows PE virtual drive, to avoid issues related to short file names.
    To prevent capturing the DISM logs in your image, choose a location that’s in your DISM Exclusion list, for example, inside C:\Recycler. For more info, see DISM Configuration List and WimScript.ini Files.
    md C:\Recycler\Scratch
    7. Recapture the Windows image. This captures the applied updates and removes any files that were marked as superseded during DISM /Cleanup-Image.
    Save the file to a location on a USB drive or a network (example: N:\Images), and give the image a name (example: "Enterprise_x64 with 8.1 Updates").
    DISM /Capture-Image /Compress:max /CheckIntegrity /ImageFile:"N:\Images\install_updated.wim" /CaptureDir:C: /Name:"Enterprise_x64 with 8.1 Updates" /ScratchDir:C:\Recycler\Scratch
    
    =================================================================
    Adding languages after adding Windows 8.1 Update
    =================================================================
    When you install Windows 8.1 Update, DISM installs only the language resources needed, based on the languages included in the base Windows image.
    
    If you add language packs after installing Windows 8.1 Update, you'll need to add the language resources for Windows 8.1 Update as well. Otherwise, the Windows user experience might not be correctly localized, and users will be prompted to download the language resources for Windows 8.1 Update from Windows Update.
    
    To add the language resources:
    Add the Windows 8.1 RTM language pack and then re-apply the update packages, either offline or online. If your PC has limited hard drive space, you might have to add the packages offline and perform all cleanup steps, as described earlier on this page.
    
     
  12. ajua

    ajua MDL Junior Member

    Feb 17, 2008
    57
    7
    0
    #392 ajua, Apr 3, 2014
    Last edited by a moderator: Apr 20, 2017
    That's invaluable info, it just saved me from trying to add them with pkgmgr.

    After reading that guide I have a question about the clean up. I'm not capturing a live image, so I will use my stored install.wim and winre.wim images. Can I run /Cleanup-Image /StartComponentCleanup /ResetBase to those images? I ask because there's a note saying that we can't cleanup the image until we boot with it.

    EDIT: I forgot to ask if I can do this with the 8.1 ADK. I downloaded a file posted in anther thread that contains the changed files fr Update 1 but I'm not sure if it's really RTM.
     
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,253
    91,028
    340
    You cannot run ResetBase to install.wim image, you have to install it first, then run the command online

    RTM dism (6.3.9600.16385) can integrate and service those updates
     
  14. ajua

    ajua MDL Junior Member

    Feb 17, 2008
    57
    7
    0
    Can /Cleanup-Image /StartComponentCleanup be run offline?
     
  15. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,426
    11,724
    240
    No, unfortunately, it stops at the same pending flag error.
    Frustrating isn't it?
     
  16. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,253
    91,028
    340
    Not to me :D
     
  17. ajua

    ajua MDL Junior Member

    Feb 17, 2008
    57
    7
    0
    I will skip the cleanup then. Thanks.
     
  18. ajua

    ajua MDL Junior Member

    Feb 17, 2008
    57
    7
    0
    #398 ajua, Apr 3, 2014
    Last edited by a moderator: Apr 20, 2017
    I added the packages with /Add-Package to both install.wim and winre.wim and after I committed the changes this is what I get when running /Get-Packages. This is just the offline image, it's not installed yet through the regular Windows setup routine.

    Code:
    C:\Program Files (x86)\PowerCmd>dism /image:D:\WinUA\Win811x64\Mount /Get-Packages
    
    Herramienta Administración y mantenimiento de imágenes de implementación
    Versión: 6.3.9600.16384
    
    Versión de imagen: 6.3.9600.17031
    
    Lista de paquetes:
    
    Identidad del paquete : Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~es-ES~6.3.9600.16384
    Estado : Instalado -> Translation: Installed
    Tipo de lanzamiento : Language Pack
    Hora de instalación : 22/08/2013 11:34 p. m.
    
    Identidad del paquete : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.3.9600.16384
    Estado : Instalado -> Translation: Installed
    Tipo de lanzamiento : Foundation
    Hora de instalación : 22/08/2013 02:46 p. m.
    
    Identidad del paquete : Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14
    Estado : Instalación pendiente -> Translation: Installation pending
    Tipo de lanzamiento : Update
    Hora de instalación : 03/04/2014 06:19 a. m.
    
    Identidad del paquete : Package_for_KB2919442~31bf3856ad364e35~amd64~~6.3.1.8
    Estado : Instalado -> Translation: Installed
    Tipo de lanzamiento : Update
    Hora de instalación : 03/04/2014 06:07 a. m.
    
    Identidad del paquete : Package_for_KB2932046~31bf3856ad364e35~amd64~~6.3.1.5
    Estado : Instalación pendiente -> Translation: Installation pending
    Tipo de lanzamiento : Feature Pack
    Hora de instalación : 03/04/2014 06:24 a. m.
    
    Identidad del paquete : Package_for_KB2937592~31bf3856ad364e35~amd64~~6.3.1.0
    Estado : Instalación pendiente -> Translation: Installation pending
    Tipo de lanzamiento : Feature Pack
    Hora de instalación : 03/04/2014 06:27 a. m.
    
    Identidad del paquete : Package_for_KB2938439~31bf3856ad364e35~amd64~~6.3.1.0
    Estado : Instalación pendiente -> Translation: Installation pending
    Tipo de lanzamiento : Feature Pack
    Hora de instalación : 03/04/2014 06:29 a. m.
    
    Identidad del paquete : Package_for_KB2949621~31bf3856ad364e35~amd64~~6.3.2.0
    Estado : Instalación pendiente -> Translation: Installation pending
    Tipo de lanzamiento : Hotfix
    Hora de instalación : 03/04/2014 06:30 a. m.
    Are those "installation pending" status normal? I mean, will they get installed when doing the Windows installation? Someone posted that he added /Prevent-Pending t the packages when adding them but I'm not sure if I need to do that as well. I'm used to installing updates with WSIM and pkgmgr but this is the first time I'm adding packages with DISM.

    Any advice on this is greatly appreciated. Thanks!
     
  19. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,426
    11,724
    240
    WINPE images are always pending. They made a shortcut for the WINPE that allows the Spring 2014 update to resetbase though.
    It only works on winpe images like winre.wim or boot.wim.
     
  20. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,253
    91,028
    340
    Very normal :D
    you can run /resetbase command on winre.wim image, and you will notice that all packages will be status: Installed

    for install.wim, yes they will get installed when doing the Windows installation