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. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    373
    171
    10
    #981 zbigniew59, Jul 24, 2021
    Last edited: Jul 25, 2021
  2. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    373
    171
    10
  3. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    #985 drew84, Jul 25, 2021
    Last edited: Jul 25, 2021
    The log from this post is for en-GB altered/edited project - returns no errors
    @zbigniew59's edit 'Optimize-Online / Optimize-Offline.psd1 / line 21 - en-US - to your language' is not needed, as it points to a help file
    and changing it basically renders it useless, as it then points to something (a link) that does not exist.
     
  4. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    What exactly do you change? I change the things in @zbigniew59 post, get that error.
     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    @zbigniew59

    Can you add Whitelist to ALL of the below? I tried by copying and pasting some of your code, no go. :(

    Code:
    WindowsApps": "WhiteList",
      "SystemApps": "WhiteList",
      "Capabilities": "WhiteList",
      "Packages": true,
      "Features": true,

     
  6. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    Just the afforementioned 3 instances
    Code:
    (Optimize-Offline Root Directory) Changed the en-US folder to en-GB,
    (Optimize-OfflineRoot Directory\Src\Public\) Changed the en-US folder to en-GB,
    (Optimize-Offline.psd1) Changed en-US reference to en-GB
    

    Ran into the same isssue previously, turned out to be a Powershell version problem


    Ran a more complete test, earlier - ran into some driver issues - but all else completed ok
    Code:
    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.1.8
    Optimize Start : 07/25/2021 07:03:23 AM
    Identity Name  : W0LF
    Computer Name  : DESKTOP-XXXXXXX
    ***************************************************************************************************
    
    2021-07-25T07:03:23 [INFO]: Supported Image Build: [22000]
    2021-07-25T07:03:26 [INFO]: Mounting Windows 11 Enterprise
    2021-07-25T07:04:58 [INFO]: Mounting Microsoft Windows Recovery Environment (amd64)
    2021-07-25T07:05:13 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2021-07-25T07:05:21 [INFO]: Removing Provisioned App Package: CortanaApp.View.App
    2021-07-25T07:05:25 [INFO]: Removing Provisioned App Package: Microsoft.BingNews
    2021-07-25T07:05:29 [INFO]: Removing Provisioned App Package: Microsoft.BingWeather
    2021-07-25T07:05:33 [INFO]: Removing Provisioned App Package: Microsoft.GamingApp
    2021-07-25T07:05:36 [INFO]: Removing Provisioned App Package: Microsoft.GetHelp
    2021-07-25T07:05:40 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftOfficeHub
    2021-07-25T07:05:44 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftSolitaireCollection
    2021-07-25T07:05:48 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftStickyNotes
    2021-07-25T07:05:52 [INFO]: Removing Provisioned App Package: Microsoft.Paint
    2021-07-25T07:05:56 [INFO]: Removing Provisioned App Package: Microsoft.People
    2021-07-25T07:06:00 [INFO]: Removing Provisioned App Package: Microsoft.Todos
    2021-07-25T07:06:03 [INFO]: Removing Provisioned App Package: Microsoft.Windows.Photos
    2021-07-25T07:06:07 [INFO]: Removing Provisioned App Package: Microsoft.WindowsAlarms
    2021-07-25T07:06:11 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCalculator
    2021-07-25T07:06:15 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCamera
    2021-07-25T07:06:19 [INFO]: Removing Provisioned App Package: microsoft.windowscommunicationsapps
    2021-07-25T07:06:24 [INFO]: Removing Provisioned App Package: Microsoft.WindowsFeedbackHub
    2021-07-25T07:06:28 [INFO]: Removing Provisioned App Package: Microsoft.WindowsMaps
    2021-07-25T07:06:32 [INFO]: Removing Provisioned App Package: Microsoft.WindowsSoundRecorder
    2021-07-25T07:06:36 [INFO]: Removing Provisioned App Package: Microsoft.YourPhone
    2021-07-25T07:06:39 [INFO]: Removing Provisioned App Package: Microsoft.ZuneMusic
    2021-07-25T07:06:43 [INFO]: Removing Provisioned App Package: Microsoft.ZuneVideo
    2021-07-25T07:06:53 [INFO]: Removing System App: Microsoft.AAD.BrokerPlugin
    2021-07-25T07:06:55 [INFO]: Removing System App: Microsoft.BioEnrollment
    2021-07-25T07:06:57 [INFO]: Removing System App: Microsoft.ECApp
    2021-07-25T07:06:59 [INFO]: Removing System App: Microsoft.LockApp
    2021-07-25T07:07:01 [INFO]: Removing System App: Microsoft.MicrosoftEdge
    2021-07-25T07:07:03 [INFO]: Removing System App: Microsoft.MicrosoftEdgeDevToolsClient
    2021-07-25T07:07:05 [INFO]: Removing System App: Microsoft.Win32WebViewHost
    2021-07-25T07:07:07 [INFO]: Removing System App: Microsoft.Windows.AddSuggestedFoldersToLibarayDialog
    2021-07-25T07:07:09 [INFO]: Removing System App: Microsoft.Windows.CapturePicker
    2021-07-25T07:07:11 [INFO]: Removing System App: Microsoft.Windows.FileExplorer
    2021-07-25T07:07:13 [INFO]: Removing System App: Microsoft.Windows.FilePicker
    2021-07-25T07:07:15 [INFO]: Removing System App: Microsoft.Windows.NarratorQuickStart
    2021-07-25T07:07:17 [INFO]: Removing System App: Windows.CBSPreview
    2021-07-25T07:07:20 [INFO]: Disabling Services, Drivers and Integration Content for Removed Apps.
    2021-07-25T07:07:28 [INFO]: Removing Windows Biometric Capability Packages.
    2021-07-25T07:07:39 [INFO]: Importing Custom App Associations.
    2021-07-25T07:07:45 [INFO]: Removing Windows Capability: App.StepsRecorder
    2021-07-25T07:07:50 [INFO]: Removing Windows Capability: App.Support.QuickAssist
    2021-07-25T07:07:55 [INFO]: Removing Windows Capability: MathRecognizer
    2021-07-25T07:08:00 [INFO]: Removing Windows Capability: OneCoreUAP.OneSync
    2021-07-25T07:08:07 [INFO]: Removing Windows Capability: Print.Fax.Scan
    2021-07-25T07:08:18 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2021-07-25T07:13:13 [INFO]: Disabling Optional Feature: SmbDirect
    2021-07-25T07:13:18 [INFO]: Disabling Optional Feature: WorkFolders-Client
    2021-07-25T07:13:24 [INFO]: Disabling Optional Feature: Printing-XPSServices-Features
    2021-07-25T07:13:53 [INFO]: Enabling Optional Feature: DirectPlay
    2021-07-25T07:13:59 [INFO]: Enabling Optional Feature: LegacyComponents
    2021-07-25T07:14:03 [INFO]: Enabling Optional Feature: Microsoft-Windows-Subsystem-Linux
    2021-07-25T07:14:13 [INFO]: Integrating the Win32 Calculator.
    2021-07-25T07:14:17 [INFO]: Applying Optimized Registry Settings.
    2021-07-25T07:14:36 [INFO]: Applying Setup Content.
    2021-07-25T07:14:40 [INFO]: Importing Registry Template: Additional Tweaks.reg
    2021-07-25T07:14:46 [INFO]: Injecting Driver Packages into Windows 11 Enterprise
    2021-07-25T07:15:07 [ERROR]: Failed to Inject Driver Packages into Windows 11 Enterprise
                                 Index     : 1
                                 Exception : An error occurred. The driver package could not be installed.
                                             For more information, check for log files in the <windir>\inf folder of the target image.
             
                                 Category  : NotSpecified: (:) [Add-WindowsDriver], COMException
                                 ErrorID   : Microsoft.Dism.Commands.AddWindowsDriverCommand
                                 Target    :
                                 Command   : [Void](Add-WindowsDriver @InstallDriverParams)
                                 Script    : D:\Optimize-Offline-4.0.1.8_gdeliana\Optimize-Offline.psm1
                                 Line      : 1682
                                 Column    : 14
    2021-07-25T07:15:10 [INFO]: Injecting Driver Packages into Microsoft Windows Recovery Environment (amd64)
    2021-07-25T07:15:30 [ERROR]: Failed to Inject Driver Packages into Microsoft Windows Recovery Environment (amd64)
                                 Index     : 0
                                 Exception : An error occurred. The driver package could not be installed.
                                             For more information, check for log files in the <windir>\inf folder of the target image.
             
                                 Category  : NotSpecified: (:) [Add-WindowsDriver], COMException
                                 ErrorID   : Microsoft.Dism.Commands.AddWindowsDriverCommand
                                 Target    :
                                 Command   : [Void](Add-WindowsDriver @RecoveryDriverParams)
                                 Script    : D:\Optimize-Offline-4.0.1.8_gdeliana\Optimize-Offline.psm1
                                 Line      : 1730
                                 Column    : 14
    2021-07-25T07:15:33 [INFO]: Cleaning-up the Start Menu Layout.
    2021-07-25T07:15:39 [INFO]: Post-Optimization Image Health State: [Healthy]
    2021-07-25T07:15:42 [INFO]: Saving and Dismounting Microsoft Windows Recovery Environment (amd64)
    2021-07-25T07:16:29 [INFO]: Rebuilding and Exporting Microsoft Windows Recovery Environment (amd64)
    2021-07-25T07:16:38 [INFO]: Saving and Dismounting Windows 11 Enterprise
    2021-07-25T07:19:27 [INFO]: Rebuilding and Exporting Windows 11 Enterprise using Maximum compression.
    2021-07-25T07:20:04 [INFO]: Finalizing Optimizations.
    2021-07-25T07:20:04 [INFO]: Optimize-Offline completed in [17] minutes with [2] errors.
    
    ***************************************************************************************************
    Optimizations Finalized : 07/25/2021 07:20:04 AM
    ***************************************************************************************************
    


    My Configuration
    Code:
    {
      "_Info": [
        "This is a JSON based Configuration file for Optimize-Offline.",
        "Ensure proper formatting is used when editing the JSON parameter values.",
        "Boolean parameter values use true and false. String parameter values must be enclosed in double-quotes."
      ],
      "SourcePath": "D:\\22000.71\\sources\\install.wim",
      "WindowsApps": "Whitelist",
      "SystemApps": "Whitelist",
      "Capabilities": "Whitelist",
      "Packages": false,
      "Features": true,
      "DeveloperMode": false,
      "WindowsStore": false,
      "MicrosoftEdge": false,
      "Win32Calc": true,
      "Dedup": false,
      "DaRT": [],
      "Registry": true,
      "Additional": {
        "Setup": true,
        "Wallpaper": false,
        "SystemLogo": false,
        "LockScreen": false,
        "RegistryTemplates": true,
        "LayoutModification": true,
        "Unattend": true,
        "Drivers": true,
        "NetFx3": false
      },
      "ComponentCleanup": false,
      "ISO": "No-Prompt"
    }
    
     
  7. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
    Hold down CTRL to select more than one item (or SHIFT to select a wide range).
     
  8. spanishfly

    spanishfly MDL Senior Member

    Dec 5, 2018
    365
    540
    10
    #991 spanishfly, Jul 25, 2021
    Last edited: Jan 9, 2022
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Mavericks Choice

    Mavericks Choice MDL Guru

    Aug 5, 2015
    3,320
    13,904
    120
    Just a question, I un commented maximum in the .psm & added this to my config.json
    "CompressionType": "Maximum"
    }
    file though OO refused to start, missing something else perhaps?
     
  10. spanishfly

    spanishfly MDL Senior Member

    Dec 5, 2018
    365
    540
    10
    #993 spanishfly, Jul 26, 2021
    Last edited: Jul 26, 2021
    With @gdeliana 's OO fork, you set the compression type to: 'Select', 'None', 'Fast', 'Maximum', 'Solid' in the "Configuration.json" only. Editing the .psm is no longer necessary.
    The setting is the last entry in the latest Configuration.json
    Code:
    ...
    ...
         "NetFx3": false
      },
      "ComponentCleanup": true,
      "ISO": "No-Prompt",
      "CompressionType": "Maximum" (choices: Select, None, Fast, Maximum, Solid)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    #994 gdeliana, Jul 26, 2021
    Last edited: Jul 26, 2021
    Hello everybody,

    Have made a some modifications to the tool:

    • Added disabling the driver update registry patches (configurable in configuration.json)
    • Added the disable windows update - this should not completeley disable the updates, but just the cummulative updates of windows. ONLY FOR PEOPLE WHO PREFER TO STICK TO ONE WINDOWS BUILD (configurable in configuration.json)
    • Added explorer ribbon back Windows 11 Tweaks, Fixes and Modifications [Overview]
     
  12. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    Is there any way that parameters can be extended to include 'FeaturesEnabled' (enabling Disabled features) and 'FeaturesDisabled' (disabling Enabled features)
    - as a rule most users would already know what they intend to Enable or Disable
     
  13. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    373
    171
    10
  14. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    373
    171
    10
    #997 zbigniew59, Jul 26, 2021
    Last edited: Jul 26, 2021
    Windows explorer ribbon added back 11 Improvements, fixes and modifications [Overview]
    Is this automatically skipped when editing eg - 19043?
    Need to edit something?

    Is this script UNIVERSAL ?
     
  15. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    373
    171
    10
    #998 zbigniew59, Jul 26, 2021
    Last edited: Jul 27, 2021
  16. spanishfly

    spanishfly MDL Senior Member

    Dec 5, 2018
    365
    540
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    You mean whitelist and blacklist for features? If so i can make it, by tomorrow it can be done :)