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

    Pir8pete MDL Member

    Nov 15, 2018
    112
    32
    10
  2. Pir8pete

    Pir8pete MDL Member

    Nov 15, 2018
    112
    32
    10
    just needs to be executed once on a new setup: Set-ExecutionPolicy Bypass -Scope CurrentUser -Force


    1.) Right click open Powershell ISE as Administrator

    2.) File-->Open-->Start-Optimize.ps1

    3.) "Run Script" green button twice
     
  3. Pir8pete

    Pir8pete MDL Member

    Nov 15, 2018
    112
    32
    10
    now why couldn't you guys just tell us these steps from the beginning!!!
     
  4. zbigniew59

    zbigniew59 MDL Member

    May 14, 2016
    101
    15
    10
    #204 zbigniew59, Jan 13, 2020
    Last edited: Jan 13, 2020
    Thanks, it works! You have to run green 2 times!
    Why?
    Why do I need 2 times? It is not important anymore. It works well!
    Thanks to Pir8pete for understanding that.
     
  5. Pir8pete

    Pir8pete MDL Member

    Nov 15, 2018
    112
    32
    10
    yeah, I have no idea why we need to click it twice, I just stumbled on it out of frustration / troubleshooting, but yeah it works.

    my guess is powershell is not in the right dir even those we selected the script, then after if points to the right place, I dunno kinda odd

    also the script thinks the .iso version is 18362.0, author will need to look into these
     
  6. Uberst

    Uberst MDL Novice

    Dec 7, 2019
    2
    0
    0
    hey,
    i changed the required things, as per KedarWolfs instructions, to accomodate my de-DE image. it runs and creates the iso, but i get the following error msg in the log:
    [ERROR]: Failed to Import Custom App Associations.
    should i worry about this, or can i proceed with the image?
    thanks in advance
     
  7. Percolator

    Percolator MDL Novice

    Aug 16, 2012
    9
    2
    0
    Excellent
    thanks for the good work
    also for the log file that shows the deletions correctly.
    everything exactly as instructed changed only the install.wim instead of the whole ISO file.
    It works as desired and in 20 minutes everything is done without errors!
    I will recommend it to others and stay up to date myself.
    Incidentally, I switched to de_DE as described without any errors.
     
  8. Uberst

    Uberst MDL Novice

    Dec 7, 2019
    2
    0
    0
    #209 Uberst, Jan 23, 2020
    Last edited: Jan 23, 2020
    thank you so much for the elaborate reply, i redid everything, switching en-US to de-DE, and still got the error. after that i copied your file structure exactly, the error persist however. maybe my image is faulty, i will try another one.
    thanks again!

    Code:
    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.0.3
    Optimize Start : 01/23/2020 07:58:46
    Identity Name  :
    Computer Name  :
    ***************************************************************************************************
    
    2020-01-23T19:58:46 [INFO]: Supported Image Build: [18362]
    2020-01-23T19:58:49 [INFO]: Mounting Windows 10 Education
    2020-01-23T19:59:33 [INFO]: Mounting Microsoft Windows Setup (x64)
    2020-01-23T19:59:40 [INFO]: Mounting Microsoft Windows Recovery Environment (x64)
    2020-01-23T19:59:52 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2020-01-23T19:59:59 [INFO]: Removing Provisioned App Package: Microsoft.BingWeather
    2020-01-23T20:00:01 [INFO]: Removing Provisioned App Package: Microsoft.DesktopAppInstaller
    2020-01-23T20:00:04 [INFO]: Removing Provisioned App Package: Microsoft.GetHelp
    2020-01-23T20:00:07 [INFO]: Removing Provisioned App Package: Microsoft.Getstarted
    2020-01-23T20:00:10 [INFO]: Removing Provisioned App Package: Microsoft.HEIFImageExtension
    2020-01-23T20:00:13 [INFO]: Removing Provisioned App Package: Microsoft.Messaging
    2020-01-23T20:00:15 [INFO]: Removing Provisioned App Package: Microsoft.Microsoft3DViewer
    2020-01-23T20:00:18 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftOfficeHub
    2020-01-23T20:00:21 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftSolitaireCollection
    2020-01-23T20:00:24 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftStickyNotes
    2020-01-23T20:00:27 [INFO]: Removing Provisioned App Package: Microsoft.MixedReality.Portal
    2020-01-23T20:00:30 [INFO]: Removing Provisioned App Package: Microsoft.MSPaint
    2020-01-23T20:00:33 [INFO]: Removing Provisioned App Package: Microsoft.Office.OneNote
    2020-01-23T20:00:36 [INFO]: Removing Provisioned App Package: Microsoft.OneConnect
    2020-01-23T20:00:38 [INFO]: Removing Provisioned App Package: Microsoft.People
    2020-01-23T20:00:41 [INFO]: Removing Provisioned App Package: Microsoft.Print3D
    2020-01-23T20:00:44 [INFO]: Removing Provisioned App Package: Microsoft.ScreenSketch
    2020-01-23T20:00:47 [INFO]: Removing Provisioned App Package: Microsoft.SkypeApp
    2020-01-23T20:00:50 [INFO]: Removing Provisioned App Package: Microsoft.StorePurchaseApp
    2020-01-23T20:00:53 [INFO]: Removing Provisioned App Package: Microsoft.VP9VideoExtensions
    2020-01-23T20:00:55 [INFO]: Removing Provisioned App Package: Microsoft.Wallet
    2020-01-23T20:00:58 [INFO]: Removing Provisioned App Package: Microsoft.WebMediaExtensions
    2020-01-23T20:01:01 [INFO]: Removing Provisioned App Package: Microsoft.WebpImageExtension
    2020-01-23T20:01:04 [INFO]: Removing Provisioned App Package: Microsoft.Windows.Photos
    2020-01-23T20:01:07 [INFO]: Removing Provisioned App Package: Microsoft.WindowsAlarms
    2020-01-23T20:01:10 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCalculator
    2020-01-23T20:01:12 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCamera
    2020-01-23T20:01:15 [INFO]: Removing Provisioned App Package: microsoft.windowscommunicationsapps
    2020-01-23T20:01:18 [INFO]: Removing Provisioned App Package: Microsoft.WindowsFeedbackHub
    2020-01-23T20:01:21 [INFO]: Removing Provisioned App Package: Microsoft.WindowsMaps
    2020-01-23T20:01:24 [INFO]: Removing Provisioned App Package: Microsoft.WindowsSoundRecorder
    2020-01-23T20:01:27 [INFO]: Removing Provisioned App Package: Microsoft.WindowsStore
    2020-01-23T20:01:30 [INFO]: Removing Provisioned App Package: Microsoft.Xbox.TCUI
    2020-01-23T20:01:32 [INFO]: Removing Provisioned App Package: Microsoft.XboxApp
    2020-01-23T20:01:35 [INFO]: Removing Provisioned App Package: Microsoft.XboxGameOverlay
    2020-01-23T20:01:38 [INFO]: Removing Provisioned App Package: Microsoft.XboxGamingOverlay
    2020-01-23T20:01:41 [INFO]: Removing Provisioned App Package: Microsoft.XboxIdentityProvider
    2020-01-23T20:01:44 [INFO]: Removing Provisioned App Package: Microsoft.XboxSpeechToTextOverlay
    2020-01-23T20:01:47 [INFO]: Removing Provisioned App Package: Microsoft.YourPhone
    2020-01-23T20:01:49 [INFO]: Removing Provisioned App Package: Microsoft.ZuneMusic
    2020-01-23T20:01:52 [INFO]: Removing Provisioned App Package: Microsoft.ZuneVideo
    2020-01-23T20:02:48 [INFO]: Removing System App: Microsoft.BioEnrollment
    2020-01-23T20:02:50 [INFO]: Removing System App: Microsoft.MicrosoftEdge
    2020-01-23T20:02:52 [INFO]: Removing System App: Microsoft.MicrosoftEdgeDevToolsClient
    2020-01-23T20:02:54 [INFO]: Removing System App: Microsoft.Windows.CallingShellApp
    2020-01-23T20:02:56 [INFO]: Removing System App: Microsoft.Windows.ParentalControls
    2020-01-23T20:02:58 [INFO]: Removing System App: Microsoft.Windows.PeopleExperienceHost
    2020-01-23T20:03:00 [INFO]: Removing System App: Microsoft.Windows.SecureAssessmentBrowser
    2020-01-23T20:03:02 [INFO]: Removing System App: Microsoft.Windows.XGpuEjectDialog
    2020-01-23T20:03:04 [INFO]: Removing System App: Microsoft.XboxGameCallableUI
    2020-01-23T20:03:06 [INFO]: Removing System App: Microsoft.Windows.ContentDeliveryManager
    2020-01-23T20:03:09 [INFO]: Disabling Services, Drivers and Integration Content for Removed Apps.
    2020-01-23T20:03:13 [INFO]: Importing Custom App Associations.
    2020-01-23T20:03:13 [ERROR]: Failed to Import Custom App Associations.
    2020-01-23T20:04:24 [INFO]: Removing Windows Capability: Hello.Face.18330
    2020-01-23T20:04:31 [INFO]: Removing Windows Capability: Hello.Face.Migration.18330
    2020-01-23T20:04:59 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2020-01-23T20:05:13 [INFO]: Disabling Optional Feature: FaxServicesClientPackage
    2020-01-23T20:05:40 [INFO]: Enabling Optional Feature: DirectPlay
    2020-01-23T20:05:47 [INFO]: Integrating the Win32 Calculator.
    2020-01-23T20:05:49 [INFO]: Integrating Microsoft DaRT 10 and Windows 19H2 Debugging Tools into Microsoft Windows Setup (x64)
    2020-01-23T20:05:55 [INFO]: Applying Optimized Registry Settings.
    2020-01-23T20:06:00 [INFO]: Applying Setup Content.
    2020-01-23T20:06:03 [INFO]: Applying Wallpaper.
    2020-01-23T20:06:06 [INFO]: Applying System Logo.
    2020-01-23T20:06:09 [INFO]: Applying Lock Screen.
    2020-01-23T20:06:12 [INFO]: Importing Registry Templates.
    2020-01-23T20:06:16 [INFO]: Cleaning-up the Start Menu Layout.
    2020-01-23T20:06:19 [INFO]: Creating a Package Summary Log.
    2020-01-23T20:06:21 [INFO]: Post-Optimization Image Health State: [Healthy]
    2020-01-23T20:06:24 [INFO]: Saving and Dismounting Microsoft Windows Setup (x64)
    2020-01-23T20:06:35 [INFO]: Saving and Dismounting Microsoft Windows Recovery Environment (x64)
    2020-01-23T20:06:45 [INFO]: Rebuilding and Exporting Microsoft Windows Setup (x64)
    2020-01-23T20:06:46 [INFO]: Rebuilding and Exporting Microsoft Windows Recovery Environment (x64)
    2020-01-23T20:06:47 [INFO]: Saving and Dismounting Windows 10 Education
    2020-01-23T20:07:34 [INFO]: Rebuilding and Exporting Windows 10 Education using Maximum compression.
    2020-01-23T20:07:36 [INFO]: Optimizing the Installation Media File Structure.
    2020-01-23T20:07:37 [INFO]: Creating a No-Prompt Bootable Windows Installation Media ISO.
    2020-01-23T20:07:46 [INFO]: Finalizing Optimizations.
    2020-01-23T20:07:51 [INFO]: Optimize-Offline completed in [8] minutes with [0] errors.
    
    ***************************************************************************************************
    Optimizations Finalized : 01/23/2020 08:07:51
    ***************************************************************************************************
    
     
  9. Why this error :
    [ERROR]: Failed to Import Custom App Associations.
    also :
    Onedrive is still there :
    please cross check to remove it from Optimised Iso in next build of Optimise-Offline either GUI or powershell script.

    Thanks & Regards :)
    This is a awesome script by developer . thanks a lot lot.
     
  10. has anybody tested version 4.0.0.4 .
    Why Developer is not building executable using Powershell Studio for this project might be it result in false positive results via AV signature scanning engines.
     
  11. Percolator

    Percolator MDL Novice

    Aug 16, 2012
    9
    2
    0
    Fresh from the press
    Changes en-US to de-DE as before
    an install.wim as a test
    and looks good as far as I can tell.

    Code:
    2020-01-27T11:51:58 [ERROR]: Failed to Import Custom App Associations.
    2020-01-27T11:53:08 [INFO]: Removing Windows Capability: App.Support.QuickAssist
    2020-01-27T11:53:56 [INFO]: Removing Windows Capability: Hello.Face.17658
    2020-01-27T11:54:12 [INFO]: Removing Windows Capability: Hello.Face.Migration.17658
    2020-01-27T11:54:28 [INFO]: Removing Windows Capability: MathRecognizer
    2020-01-27T11:54:43 [INFO]: Removing Windows Capability: OneCoreUAP.OneSync
    2020-01-27T11:54:59 [INFO]: Removing Windows Capability: OpenSSH.Client
    2020-01-27T11:56:20 [INFO]: Removing Windows Package: Microsoft-Windows-FodMetadata
    2020-01-27T11:56:42 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2020-01-27T11:57:59 [INFO]: Applying Optimized Registry Settings.
    2020-01-27T11:58:05 [INFO]: Applying Setup Content.
    2020-01-27T11:58:08 [INFO]: Applying Wallpaper.
    2020-01-27T11:58:11 [INFO]: Applying System Logo.
    2020-01-27T11:58:14 [INFO]: Applying Lock Screen.
    2020-01-27T11:58:18 [INFO]: Importing Registry Templates.
    2020-01-27T11:58:21 [INFO]: Cleaning-up the Start Menu Layout.
    2020-01-27T11:58:24 [INFO]: Creating a Package Summary Log.
    2020-01-27T11:58:28 [INFO]: Post-Optimization Image Health State: [Healthy]
    2020-01-27T11:58:31 [INFO]: Saving and Dismounting Microsoft Windows Recovery Environment (x64)
    2020-01-27T11:58:50 [INFO]: Rebuilding and Exporting Microsoft Windows Recovery Environment (x64)
    2020-01-27T11:58:53 [INFO]: Saving and Dismounting Windows 10 Enterprise LTSC
    2020-01-27T12:00:38 [INFO]: Rebuilding and Exporting Windows 10 Enterprise LTSC using Maximum compression.
    2020-01-27T12:01:58 [INFO]: Finalizing Optimizations.
    2020-01-27T12:02:03 [INFO]: Optimize-Offline completed in [16] minutes with [1] errors.
    
    ***************************************************************************************************
    Optimizations Finalized : 01/27/2020 12:02:03
    ***************************************************************************************************
    
     
  12. KedarWolf

    KedarWolf MDL Senior Member

    Mar 17, 2016
    456
    332
    10
    You are getting the Custom Apps Associations error.

    And what lines and files did you change? I'm trying on the pl-PL ISO for someone that had issues and i get this error.

    WARNING: Failed to import the localized data file: "Optimize-Offline.strings.psd1"
     
  13. Percolator

    Percolator MDL Novice

    Aug 16, 2012
    9
    2
    0
    @KedarWolf

    Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
    In C:\Optimize\Optimize-Offline-4.0.0.4\Src\Public\Export-ErrorLog.ps1:8 Zeichen:9
    + [PSCustomObject]@{
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: :)) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
     
  14. now its clean that i am not only the one with error at last :

    Optimize-Offline completed in [16] minutes with [1] errors.
    but iso is created & i checked to install it in a vm worked fine .


    [ERROR]: Failed to Import Custom App Associations.
    same error again as usual as well as onedrive isnt removed with 4.0.0.4 too.
     
  15. Mavericks Choice

    Mavericks Choice MDL Expert

    Aug 5, 2015
    1,541
    5,592
    60
    Just did a test run with 4004, ran with no errors in a time of 20mins.
     
  16. drew84

    drew84 MDL Addicted

    Mar 13, 2014
    697
    1,148
    30
  17. quakze

    quakze MDL Junior Member

    Dec 15, 2011
    62
    10
    0
    I am getting error "unsupported image build: (19041)" with 4.0.0.4

    I did change 18362 to 19041 in Optimize-Offline.psm1.

    @drew84 Any help is much appreciated !
     
  18. drew84

    drew84 MDL Addicted

    Mar 13, 2014
    697
    1,148
    30
    #220 drew84, Jan 28, 2020
    Last edited: Jan 28, 2020
    .. Haven't had a chance to look at any modifications that Godhand may have applied to his recent release,
    due to being laid up with a serious hip injury... but will certainly look in to it when/as soon as I get a chance.

    With luck, KedarWolf may have a solution/reason for you before then....

    Edit: .. just had a quick look and the only thing that catches my eye (and I don't see why it should have an effect) is;
    after the 3rd 18362 reference { $CodeName = '19H2' } <-- maybe needs to be changed to 20H1