[ARCHIVED] Windows Editions Reconstruction Project

Discussion in 'Windows 10' started by whatever127, Jan 10, 2020.

Thread Status:
Not open for further replies.
  1. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    It's clear to me :)
    Looks like my powershell trick to remove packages, but via cmd. There's some very recognizable abbodi1406's script style in-there so it might look a bit intimidating. delMicron might have missed something when he adapted it, but otherwise solid!
    I would do it in powershell from start to end tho, since it still getting used, but inefficiently, spanning multiple processes. Only trouble is the dinosaurs do not like powershell, and prefer to stick with their antiqued guns ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Its a very easy task to remove LCU or SSU directly without making the component package visible & removing its owner dependency cuz these are already visible in a offline image if we run pwsh getwindowspackage pipeline ogv - passthru pipeline removewindowspackage . whats the use of going through this process if packages are already visible in pwsh gui removal window :)

    Hint :
    This script will work where we are not able to see the component packages like EDGE Chromium & OneDrive etc etc ........

    Pl cross check :)
     
  3. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
    Could you share detailed info about "pwsh getwindowspackage pipeline ogv - passthru pipeline removewindowspackage"?
     
  4. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
  5. delMicron

    delMicron MDL Junior Member

    Dec 28, 2021
    61
    28
    0
    Are you sure that you are using the same image version?
    With the original build that's rigth, that batch will fail and the package will not removed.
    Sorry.... :p
     
  6. delMicron

    delMicron MDL Junior Member

    Dec 28, 2021
    61
    28
    0
    You're right, I learn so much from yours and abbodi1406's perfect script and some google search, and I try to adopt it to adjust with the needs. :rolleyes:
     
  7. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
    Yes, official CMGE_V2022-L.1345.iso.

    It's OK, no worries.
     
  8. Powershell -C "Get-WindowsPackage -Path 'Mount' | OGV -PassThru -Title 'Select Windows Packages to Remove' | Remove-WindowsPackage -Path 'Mount' -Verbose"

    Here 'Mount' is Mounted Path of Image as i use "SetLocal EnableDelayedExpansion" then "cd /d %~dp0" in first after @echo off theres no need to set path on mounted image as everything is done within project directory where the main script exists.

    Give it a try & you will see all updates including SSU & LCU in grid view output list.
     
  9. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
    Much appreciated. But I am really bad at PowerShell. It's OK. I can use the way I am used to. Thanks.
     
  10. Thanks for your So Sweet Comment .

    Regards,
    Fan of Your Skills in Reconstruction.
     
  11. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
    #6772 xinso, Mar 1, 2022
    Last edited: Mar 3, 2022
    Thank you. Here is the one I am happy with:
    Code:
    if exist temp\1.txt del /f /q temp\1.txt
    if exist %MT%\Windows\servicing\Packages\Package_for_*.mum dir /b %MT%\Windows\servicing\Packages\Package_for_*.mum >>temp\1.txt
    if exist temp\1.txt (
    for /f %%x in ('findstr /i "ServicingStack" temp\1.txt 2^>nul') do powershell -Command "(gc %MT%\Windows\servicing\Packages\%%x) -replace 'permanent', 'removable' | sc %MT%\Windows\servicing\Packages\%%x"
    powershell -Command "(gc temp\1.txt) -replace '.mum', '' | sc temp\1.txt"
    for /f %%x in ('findstr /i . temp\1.txt 2^>nul') do if exist %MT%\Windows\servicing\Packages\%%x.mum (
    reg load HKLM\SOFTWARE1 %MT%\Windows\System32\config\SOFTWARE >nul
    reg add "HKLM\SOFTWARE1\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%%x" /v Visibility /t REG_DWORD /d 1 /f >NUL 2>&1
    reg delete "HKLM\SOFTWARE1\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%%x\Owners" /f >NUL 2>&1
    reg unload HKLM\SOFTWARE1 >nul
    echo.
    echo ------------------------------------------------------------
    echo Removing %%x
    echo ------------------------------------------------------------
    dism /english /image:%MT% /Remove-package /Packagename:%%x
    )
    )
    
    Code:
    ------------------------------------------------------------
    Removing Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4400.1
    ------------------------------------------------------------
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.746
    
    Image Version: 10.0.19041.1
    
    Processing 1 of 1 - Removing package Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4400.1
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ------------------------------------------------------------
    Removing Package_for_KB5003791~31bf3856ad364e35~amd64~~19041.1237.1.3
    ------------------------------------------------------------
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.746
    
    Image Version: 10.0.19041.1
    
    Processing 1 of 1 - Removing package Package_for_KB5003791~31bf3856ad364e35~amd64~~19041.1237.1.3
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ------------------------------------------------------------
    Removing Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1415.1.6
    ------------------------------------------------------------
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.746
    
    Image Version: 10.0.19041.1
    
    Processing 1 of 1 - Removing package Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1415.1.6
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ------------------------------------------------------------
    Removing Package_for_ServicingStack_1371~31bf3856ad364e35~amd64~~19041.1371.1.0
    ------------------------------------------------------------
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.746
    
    Image Version: 10.0.19041.1
    
    Processing 1 of 1 - Removing package Package_for_ServicingStack_1371~31bf3856ad364e35~amd64~~19041.1371.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ------------------------------------------------------------
    Removing Package_for_ServicingStack~31bf3856ad364e35~amd64~~19041.1220.1.0
    ------------------------------------------------------------
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.746
    
    Image Version: 10.0.19041.1
    
    Processing 1 of 1 - Removing package Package_for_ServicingStack~31bf3856ad364e35~amd64~~19041.1220.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    PS:
    It works only when the image base has not been resetted. Otherwise:
    Code:
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.844
    
    Image Version: 10.0.19041.1415
    
    Processing 1 of 1 - Removing package Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1415.1.6
    [==========================100.0%==========================]
    An error occurred - Package_for_RollupFix Error: 0x800f0905
    
    Error: 0x800f0905
    
    DISM failed. No operation was performed.
    For more information, review the log file.
    
     
  12. gailium119

    gailium119 MDL Addicted

    Oct 12, 2021
    790
    510
    30
    @xinso how can i create a normal image from an unstaged image using dism and the reverse?
     
  13. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
    #6774 xinso, Mar 3, 2022
    Last edited: Mar 3, 2022
    I have quitted recontructing such an image for following reasons:
    1. It creates barebone system only.
    2. It can be installed from iso boot only.
    3. It always prompts license terms not found at OOBE phase.
     
  14. gailium119

    gailium119 MDL Addicted

    Oct 12, 2021
    790
    510
    30
    What I mean is how can I stage the unstaged image
    By adding edition files , langpacks and apps?
     
  15. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,711
    14,436
    340
    I have no further researching about that since I had quitted on it.

    You can search or PM example12345678912345678 for 19100.1051.210916-1011.VB_RELEASE_SVC_TEAM_FLIGHT_CLIENTUNSTAGED_RETAIL_X64FRE_EN-US.ISO.
     
  16. gailium119

    gailium119 MDL Addicted

    Oct 12, 2021
    790
    510
    30
    @example12345678912345678 Could you please tell me how can I stage the 19100.1051.210916-1011.VB_RELEASE_SVC_TEAM_FLIGHT_CLIENTUNSTAGED_RETAIL_X64FRE_EN-US.ISO using DISM and/or pkgmgr?
     
  17. example12345678912345678

    Dec 29, 2019
    569
    322
    30
    #6778 example12345678912345678, Mar 3, 2022
    Last edited: Mar 17, 2022
    I actually don't know how to convert an unstaged ISO to staged or backwards. The best thing I can tell is this:
    1. Create a virtual machine with any settings but the virtual disk type must be .VHD in VirtualBox, so you can mount it.
    2. Install the OS normally.
    3. Open command prompt under elevated privileges and run this command on VM:
    Code:
    Sysprep.exe /generalize /oobe /shutdown
    4. Mount VHD and capture the image file either via this DISM command or using third party GUI software:
    Code:
    DISM /capture-image /imagefile:<Full path>\install.wim /CaptureDir:<The volume letter of mounted drive>:\ /Name:"<OS Name>"
    5. Dismount the drive.
    6. If you're going to convert multiple images, then you have to repeat the steps 2-5 for each edition.
    7. Use any ISO editor to replace install.wim file in "<Root>\sources\" folder.
    P.S: PM me if you want the ISO link since it's against the rules to share homebrew ISOs.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,923
    150
    Why bother with vbox when you have hyper-v that for this scope is hand down better?
     
  19. gailium119

    gailium119 MDL Addicted

    Oct 12, 2021
    790
    510
    30
    could the image be dismed and/or pkgmgred? And,why is it a homebrew image