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

    quakze MDL Junior Member

    Dec 15, 2011
    In short, there is no effect of updates on the OS.

    I am using Optimize Offline script created OS from two months, and non of the app reverted back.
  2. Pir8pete

    Pir8pete MDL Member

    Nov 15, 2018
    why is it after running this on the image it doesn't boot any longer, making using this pointless
  3. if this line
    ErrorID = $PSItem.FullyQualifiedErrorId
    is removed from

    then will it work without any errors .
  4. KedarWolf

    KedarWolf MDL Senior Member

    Mar 17, 2016
    Google ADK and install it, it'll fix the "2020-02-04T15:31:58 [ERROR]: Failed to Import Custom App Associations." and
    "You cannot call a method on a null-valued expression.
    At C:\Users\%UserName%\Desktop\Optimize-Offline\Src\Public\Export-ErrorLog.ps1:10 char:13".
  5. KedarWolf

    KedarWolf MDL Senior Member

    Mar 17, 2016
    If anyone is having trouble installing Windows Store apps follow the instructions from this post https://forums.mydigitallife.net/th...-1909-and-ltsc-2019.80038/page-8#post-1568785 by drew84 and also the below.

    Delete the value 'DODownloadMode' under 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' via regedit and then reboot.

    Edit: I'll add this stuff to OP soon including the ADK install, I just spent hours figuring this all out and is 6:22 a.m. and I'm going to bed finally. :(
  6. let me check after installing win10 adk & will update with log if it has errors or not.
  7. no any reg hive is found under windows ie : DeliveryOptimization
  8. KedarWolf

    KedarWolf MDL Senior Member

    Mar 17, 2016
    Open Regedit, now open Hkey_Local_Machine then Software, next Policies, then Microsoft, and then Windows, finally DeliveryOptimization. If you don't have a 'DODownloadMode' key there you should be fine but you can Google how to Set P2P Update To Local if you still have Windows Store app issues, some apps won't install unless it's set that way.
  9. Great no errors Now after adk is installed :

    Running Module : Optimize-Offline
    Optimize Start : 02/05/2020 05:08:56 PM
    Identity Name  : %Username%
    Computer Name  : %Username%
    2020-02-05T17:08:56 [INFO]: Supported Image Build: [18362]
    2020-02-05T17:08:59 [INFO]: Mounting Windows 10 Pro
    2020-02-05T17:09:47 [INFO]: Mounting Microsoft Windows Setup (x64)
    2020-02-05T17:09:55 [INFO]: Mounting Microsoft Windows Recovery Environment (x64)
    2020-02-05T17:10:07 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2020-02-05T17:10:13 [INFO]: Removing Provisioned App Package: Microsoft.BingWeather
    2020-02-05T17:10:16 [INFO]: Removing Provisioned App Package: Microsoft.DesktopAppInstaller
    2020-02-05T17:10:19 [INFO]: Removing Provisioned App Package: Microsoft.GetHelp
    2020-02-05T17:10:21 [INFO]: Removing Provisioned App Package: Microsoft.Getstarted
    2020-02-05T17:10:24 [INFO]: Removing Provisioned App Package: Microsoft.HEIFImageExtension
    2020-02-05T17:10:26 [INFO]: Removing Provisioned App Package: Microsoft.Messaging
    2020-02-05T17:10:29 [INFO]: Removing Provisioned App Package: Microsoft.Microsoft3DViewer
    2020-02-05T17:10:31 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftOfficeHub
    2020-02-05T17:10:34 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftSolitaireCollection
    2020-02-05T17:10:36 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftStickyNotes
    2020-02-05T17:10:39 [INFO]: Removing Provisioned App Package: Microsoft.MixedReality.Portal
    2020-02-05T17:10:42 [INFO]: Removing Provisioned App Package: Microsoft.MSPaint
    2020-02-05T17:10:44 [INFO]: Removing Provisioned App Package: Microsoft.Office.OneNote
    2020-02-05T17:10:47 [INFO]: Removing Provisioned App Package: Microsoft.OneConnect
    2020-02-05T17:10:49 [INFO]: Removing Provisioned App Package: Microsoft.People
    2020-02-05T17:10:52 [INFO]: Removing Provisioned App Package: Microsoft.Print3D
    2020-02-05T17:10:54 [INFO]: Removing Provisioned App Package: Microsoft.ScreenSketch
    2020-02-05T17:10:57 [INFO]: Removing Provisioned App Package: Microsoft.SkypeApp
    2020-02-05T17:11:00 [INFO]: Removing Provisioned App Package: Microsoft.StorePurchaseApp
    2020-02-05T17:11:02 [INFO]: Removing Provisioned App Package: Microsoft.VP9VideoExtensions
    2020-02-05T17:11:05 [INFO]: Removing Provisioned App Package: Microsoft.Wallet
    2020-02-05T17:11:07 [INFO]: Removing Provisioned App Package: Microsoft.WebMediaExtensions
    2020-02-05T17:11:10 [INFO]: Removing Provisioned App Package: Microsoft.WebpImageExtension
    2020-02-05T17:11:12 [INFO]: Removing Provisioned App Package: Microsoft.Windows.Photos
    2020-02-05T17:11:15 [INFO]: Removing Provisioned App Package: Microsoft.WindowsAlarms
    2020-02-05T17:11:18 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCalculator
    2020-02-05T17:11:20 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCamera
    2020-02-05T17:11:23 [INFO]: Removing Provisioned App Package: microsoft.windowscommunicationsapps
    2020-02-05T17:11:26 [INFO]: Removing Provisioned App Package: Microsoft.WindowsFeedbackHub
    2020-02-05T17:11:28 [INFO]: Removing Provisioned App Package: Microsoft.WindowsMaps
    2020-02-05T17:11:31 [INFO]: Removing Provisioned App Package: Microsoft.WindowsSoundRecorder
    2020-02-05T17:11:34 [INFO]: Removing Provisioned App Package: Microsoft.WindowsStore
    2020-02-05T17:11:36 [INFO]: Removing Provisioned App Package: Microsoft.Xbox.TCUI
    2020-02-05T17:11:39 [INFO]: Removing Provisioned App Package: Microsoft.XboxApp
    2020-02-05T17:11:41 [INFO]: Removing Provisioned App Package: Microsoft.XboxGameOverlay
    2020-02-05T17:11:44 [INFO]: Removing Provisioned App Package: Microsoft.XboxGamingOverlay
    2020-02-05T17:11:46 [INFO]: Removing Provisioned App Package: Microsoft.XboxIdentityProvider
    2020-02-05T17:11:49 [INFO]: Removing Provisioned App Package: Microsoft.XboxSpeechToTextOverlay
    2020-02-05T17:11:51 [INFO]: Removing Provisioned App Package: Microsoft.YourPhone
    2020-02-05T17:11:54 [INFO]: Removing Provisioned App Package: Microsoft.ZuneMusic
    2020-02-05T17:11:56 [INFO]: Removing Provisioned App Package: Microsoft.ZuneVideo
    2020-02-05T17:13:32 [INFO]: Removing System App: InputApp
    2020-02-05T17:13:34 [INFO]: Removing System App: Microsoft.AAD.BrokerPlugin
    2020-02-05T17:13:36 [INFO]: Removing System App: Microsoft.BioEnrollment
    2020-02-05T17:13:38 [INFO]: Removing System App: Microsoft.ECApp
    2020-02-05T17:13:40 [INFO]: Removing System App: Microsoft.LockApp
    2020-02-05T17:13:42 [INFO]: Removing System App: Microsoft.MicrosoftEdge
    2020-02-05T17:13:44 [INFO]: Removing System App: Microsoft.MicrosoftEdgeDevToolsClient
    2020-02-05T17:13:46 [INFO]: Removing System App: Microsoft.PPIProjection
    2020-02-05T17:13:48 [INFO]: Removing System App: Microsoft.Win32WebViewHost
    2020-02-05T17:13:50 [INFO]: Removing System App: Microsoft.Windows.AppResolverUX
    2020-02-05T17:13:52 [INFO]: Removing System App: Microsoft.Windows.AddSuggestedFoldersToLibarayDialog
    2020-02-05T17:13:54 [INFO]: Removing System App: Microsoft.Windows.CallingShellApp
    2020-02-05T17:13:56 [INFO]: Removing System App: Microsoft.Windows.Cortana
    2020-02-05T17:13:58 [INFO]: Removing System App: Microsoft.Windows.FileExplorer
    2020-02-05T17:14:00 [INFO]: Removing System App: Microsoft.Windows.FilePicker
    2020-02-05T17:14:02 [INFO]: Removing System App: Microsoft.Windows.ContentDeliveryManager
    2020-02-05T17:14:04 [INFO]: Removing System App: Microsoft.Windows.ParentalControls
    2020-02-05T17:14:06 [INFO]: Removing System App: Microsoft.Windows.PeopleExperienceHost
    2020-02-05T17:14:09 [INFO]: Removing System App: Microsoft.Windows.SecHealthUI
    2020-02-05T17:14:11 [INFO]: Removing System App: Microsoft.Windows.SecureAssessmentBrowser
    2020-02-05T17:14:13 [INFO]: Removing System App: Microsoft.Windows.XGpuEjectDialog
    2020-02-05T17:14:15 [INFO]: Removing System App: Microsoft.XboxGameCallableUI
    2020-02-05T17:14:17 [INFO]: Removing System App: Windows.CBSPreview
    2020-02-05T17:14:19 [INFO]: Disabling Services, Drivers and Integration Content for Removed Apps.
    2020-02-05T17:14:25 [INFO]: Disabling Optional Feature: Windows-Defender-Default-Definitions
    2020-02-05T17:14:30 [INFO]: Importing Custom App Associations.
    2020-02-05T17:15:01 [INFO]: Removing Windows Capability: App.Support.QuickAssist
    2020-02-05T17:15:07 [INFO]: Removing Windows Capability: Browser.InternetExplorer
    2020-02-05T17:15:12 [INFO]: Removing Windows Capability: Hello.Face.18330
    2020-02-05T17:15:18 [INFO]: Removing Windows Capability: Hello.Face.Migration.18330
    2020-02-05T17:15:23 [INFO]: Removing Windows Capability: MathRecognizer
    2020-02-05T17:15:28 [INFO]: Removing Windows Capability: Media.WindowsMediaPlayer
    2020-02-05T17:15:36 [INFO]: Removing Windows Capability: OneCoreUAP.OneSync
    2020-02-05T17:15:42 [INFO]: Removing Windows Capability: OpenSSH.Client
    2020-02-05T17:15:59 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-Speech-en-us
    2020-02-05T17:16:05 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-OCR-en-us
    2020-02-05T17:16:10 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-Handwriting-en-us
    2020-02-05T17:16:19 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2020-02-05T17:17:03 [INFO]: Disabling Optional Feature: FaxServicesClientPackage
    2020-02-05T17:17:06 [INFO]: Disabling Optional Feature: MediaPlayback
    2020-02-05T17:17:08 [INFO]: Disabling Optional Feature: Printing-Foundation-Features
    2020-02-05T17:17:10 [INFO]: Disabling Optional Feature: Printing-Foundation-InternetPrinting-Client
    2020-02-05T17:17:12 [INFO]: Disabling Optional Feature: Printing-XPSServices-Features
    2020-02-05T17:17:14 [INFO]: Disabling Optional Feature: SmbDirect
    2020-02-05T17:17:16 [INFO]: Disabling Optional Feature: WCF-TCP-PortSharing45
    2020-02-05T17:17:18 [INFO]: Disabling Optional Feature: WorkFolders-Client
    2020-02-05T17:17:32 [INFO]: Integrating the Win32 Calculator.
    2020-02-05T17:17:34 [INFO]: Applying Optimized Registry Settings.
    2020-02-05T17:17:37 [INFO]: Applying Setup Content.
    2020-02-05T17:17:40 [INFO]: Applying Wallpaper.
    2020-02-05T17:17:43 [INFO]: Applying Lock Screen.
    2020-02-05T17:17:46 [INFO]: Importing Registry Templates.
    2020-02-05T17:17:50 [INFO]: Cleaning-up the Start Menu Layout.
    2020-02-05T17:17:53 [INFO]: Creating a Package Summary Log.
    2020-02-05T17:17:55 [INFO]: Post-Optimization Image Health State: [Healthy]
    2020-02-05T17:17:58 [INFO]: Saving and Dismounting Microsoft Windows Setup (x64)
    2020-02-05T17:18:09 [INFO]: Saving and Dismounting Microsoft Windows Recovery Environment (x64)
    2020-02-05T17:18:20 [INFO]: Rebuilding and Exporting Microsoft Windows Setup (x64)
    2020-02-05T17:18:23 [INFO]: Rebuilding and Exporting Microsoft Windows Recovery Environment (x64)
    2020-02-05T17:18:25 [INFO]: Saving and Dismounting Windows 10 Pro
    2020-02-05T17:19:33 [INFO]: Rebuilding and Exporting Windows 10 Pro using Maximum compression.
    2020-02-05T17:19:47 [INFO]: Optimizing the Installation Media File Structure.
    2020-02-05T17:19:47 [INFO]: Creating a Prompt Bootable Windows Installation Media ISO.
    2020-02-05T17:19:59 [INFO]: Finalizing Optimizations.
    2020-02-05T17:20:05 [INFO]: Optimize-Offline completed in [11] minutes with [0] errors.
    Optimizations Finalized : 02/05/2020 05:20:05 PM
  10. KedarWolf

    KedarWolf MDL Senior Member

    Mar 17, 2016
    I also removed the below lines from 'Optimize-Offline.psm1' as the tweaks it uses interfere with Windows Store functionality.

    If ($RemovedAppxPackages.Keys -like "*Xbox*" -or $RemovedSystemApps.'Microsoft.XboxGameCallableUI')
                        RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "AppCaptureEnabled" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "AudioCaptureEnabled" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "CursorCaptureEnabled" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\GameBar" -Name "AutoGameModeEnabled" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\GameBar" -Name "AllowAutoGameMode" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\GameBar" -Name "UseNexusForGameBarEnabled" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\System\GameConfigStore" -Name "GameDVR_Enabled" -Value 0 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\System\GameConfigStore" -Name "GameDVR_FSEBehavior" -Value 2 -Type DWord
                        RegKey -Path "HKLM:\WIM_HKCU\System\GameConfigStore" -Name "GameDVR_FSEBehaviorMode" -Value 2 -Type DWord
                        @("xbgm", "XblAuthManager", "XblGameSave", "xboxgip", "XboxGipSvc", "XboxNetApiSvc") | ForEach-Object -Process { If (Test-Path -Path "HKLM:\WIM_HKLM_SYSTEM\ControlSet001\Services\$($PSItem)") { RegKey -Path "HKLM:\WIM_HKLM_SYSTEM\ControlSet001\Services\$($PSItem)" -Name "Start" -Value 4 -Type DWord } }
                        If ($InstallInfo.Build -lt '17763') { [Void]$Visibility.Append('gaming-trueplay;') }
  11. case-sensitive

    case-sensitive MDL Senior Member

    Nov 7, 2013
    Can anyone please point me at a comparison between what this tool does and other tools like NTLite ? I mean scope and plus and minus points . Thanks .
  12. shall we have to remove the above reg keys from Optimize-Offline.psm1 or will it be updated in next released update might be
  13. i hope developer will look to add integeration of updates via this tool as an additional ps script so that theres no any need to update the final iso again using other tools like ntlite etc for a fully featured updated debloated final iso as result .
    Might be in next relases but am not sure as depends upon developer if he looks at my post & will take it into consideration.
  14. Mavericks Choice

    Mavericks Choice MDL Expert

    Aug 5, 2015
    I already have a good PS script for updating images offline, I don't think this needs to be a one stop.
    yes i agree that Win10UI by Abbodi1406 Brother is the best script to be used to integerate updates into an offline Win10 image but it will be great if this script will also perform the same using an addittional ps script in build in the optimize offline project. i dont have any github account thatswhy i am requesting it here on our MDL Community.