Optimize-Offline Guide - Windows Debloating Tool, Windows 1803, 1903, 19H2, 1909, 20H1 and LTSC 2019

Discussion in 'Windows 10' started by KedarWolf, Jul 30, 2019.

  1. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    #1361 drew84, Oct 1, 2021
    Last edited: Oct 1, 2021
    Perhaps this needs to be put at OP... just a thought
    Optimize-Offline
    Script for removing features from a Windows 10/11 ISO pre-installation.
    Most of the changes it does can be done on a live installation in a rollbackable (Safer) way instead,
    Therefore O-O is definately not recommended for beginners.
    Doing things wrong or not following the documentation can result in a (subtly) broken install that can only be fixed by reinstalling.

    Updated the (Commits) Changelog
     
  2. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
  3. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
  4. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
  5. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
    Update: I created a 19044.1266 VM from uupdump and the gdeliana-2 version worked. I guess something in my current LTSC was causing issues. Glad to see it's working again.
     
  6. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
  7. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    Added this blurb.

    Important Note: This script is for advanced users. You can break your Windows install if you don't follow the guides and remove the wrong things. The Windows install will error out and the only fix is to have backup Windows install media you are sure works.
    I STRONGLY suggest you install VMWare and test your Optimise Offline ISO/Windows install media you made before installing it on a live system.
     
  8. spanishfly

    spanishfly MDL Senior Member

    Dec 5, 2018
    365
    540
    10
    I've never removed this System app, but looking at the link you shared, I'm beginning to wonder if the 'Feature Experience Pack' does anything useful and maybe I should chuck it?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    #1371 drew84, Oct 4, 2021
    Last edited: Oct 4, 2021
    meant (at the very least) for deploying latest features (for testing), so it depends on your need for tinkering with those features (if any) early
    you certainly won't miss out on anything, as you will get them by upgrading to any new build.. by which time they will have been (heaven forbid) properly deployed

    Edit: seems I am seriously mistaken, certainly regarding 22468... guess M$ is at it... yet again see @gdeliana's post following this one
     
  10. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    @gdeliana, getting seriously frustrated here (feeling like an utter noobe right now)

    If I run (as admin) populateTemplates.bat, cmd opens and closes immediately

    If I open CMD in root of project folder and run powershell .\Start-Optimize -populateTemplates
    I have to manually select path as the script does not appear to retrieve info from Configuration.json

    however on running this happens...

    Copying WIM from "D:\22468.1000_amd64_en-gb_DF\sources"
    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.1.9
    Optimize Start : 10/04/2021 12:39:22 PM
    Identity Name : W0LF
    Computer Name : DESKTOP-XXXXXXX
    ***************************************************************************************************

    2021-10-04T12:39:22 [INFO]: Supported Image Build: [22468]
    2021-10-04T12:39:25 [INFO]: Mounting Windows 11 Enterprise
    2021-10-04T12:40:16 [INFO]: Mounting
    2021-10-04T12:40:16 [ERROR]: Failed to Mount
    2021-10-04T12:40:16 [INFO]: Discarding any Images and Terminating Optimizations.

    ***************************************************************************************************
    Optimizations Failed : 10/04/2021 12:40:16 PM
    ***************************************************************************************************
    Active mount points detected. Performing clean-up.

    ***************************************************************************************************
    Code:
    Index     : 0
    Exception : Cannot validate argument on parameter 'ImagePath'. The argument is null or empty. Provide an argument that
                is not null or empty, and then try the command again.
    Category  : InvalidData:  (:) [Mount-WindowsImage], ParameterBindingValidationException
    ErrorID   : ParameterArgumentValidationError,Microsoft.Dism.Commands.MountWindowsImageCommand
    Target    :
    Command   : [Void](Mount-WindowsImage @MountBootParams)
    Script    : D:\Optimize-Offline-master_11_4.01.9_G3_A3_personal_gdeliana\Optimize-Offline.psm1
    Line      : 449
    Column    : 31   --  is the i in [Mount-WindowsImage]
    
    Index     : 1
    Exception : Cannot bind argument to parameter 'Path' because it is null.
    Category  : InvalidData:  (:) [Resolve-FullPath], ParameterBindingValidationException
    ErrorID   : ParameterArgumentValidationErrorNullNotAllowed,Resolve-FullPath
    Target    :
    Command   : Log ($OptimizeData.FailedToRetrieveImageMetadata -f (GetPath -Path $BootWim -Split Leaf)) -Type Error
                -ErrorRecord $Error[0]
    Script    : D:\Optimize-Offline-master_11_4.01.9_G3_A3_personal_gdeliana\Optimize-Offline.psm1
    Line      : 432
    Column    : 72  --  is the t in (GetPath
    
    Index     : 2
    Exception : Cannot bind argument to parameter 'ImageFile' because it is null.
    Category  : InvalidData:  (:) [Get-ImageData], ParameterBindingValidationException
    ErrorID   : ParameterArgumentValidationErrorNullNotAllowed,Get-ImageData
    Target    :
    Command   : $BootInfo = $BootWim | Get-ImageData -Index 2 -ErrorAction Stop
    Script    : D:\Optimize-Offline-master_11_4.01.9_G3_A3_personal_gdeliana\Optimize-Offline.psm1
    Line      : 428
    Column    : 28  --  points to the gap/space after =    $BootInfo = $BootWim
    
    Is it that the script doesn't run on build 22468 (Daily Driver), or am I missing somthing monumentally simple.. ie. turn Defender off
     
  11. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
  12. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    #1376 KedarWolf, Oct 5, 2021
    Last edited: Oct 5, 2021
    (OP)
    if you have Windows 10 and don't want to upgrade to Windows 11, make sure TPM is disable in the bios or add this registry file.

    Save it as StopWin11.reg and double click it.

    Code:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
    "TargetReleaseVersion"=dword:00000001
    "TargetReleaseVersionInfo"="21H2"
    "ProductVersion"="Windows 10" 
    
    Or add the below to your Additional Tweaks.reg file.

    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
    "TargetReleaseVersion"=dword:00000001
    "TargetReleaseVersionInfo"="21H2"
    "ProductVersion"="Windows 10" 
    
     
  13. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    373
    171
    10
    @abbodi1406 wrote -

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
    "TargetReleaseVersion"=dword:00000001
    "TargetReleaseVersionInfo"="21H2"
    "ProductVersion"="Windows 10"

    :)
     
  14. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    Thank you, I had the wrong info from another post in a thread in the forum.
     
  15. qommonsense

    qommonsense MDL Novice

    Mar 2, 2010
    25
    8
    0
    Could you not have linked the script only? Or, does the fix include bundles not found inside previous releases? I find downloading the same bundles with every release not only annoying but wasteful. Thank you.

    Grateful user.
     
  16. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60