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 Addicted

    Mar 13, 2014
    883
    1,345
    30
    The Cortana referred to in the Readme is the original Cortana, which is tied to Windows Search
    The current CortanaApp.View.App is not tied to Windows Search, and as such does not affect Search capabilities and is safe to remove

    ... a lot of people continue to mix up the two
     
  2. Dgk

    Dgk MDL Junior Member

    Jan 18, 2020
    75
    25
    0
    Sure, in 20h1 and 20h2 there is no other Cortana to remove, though.
     
  3. drew84

    drew84 MDL Addicted

    Mar 13, 2014
    883
    1,345
    30
    #723 drew84, Jan 15, 2021
    Last edited: Jan 15, 2021
    ... however both (Microsoft.Windows.Cortana and CortanaApp.View.App) exist in earlier versions
    therefore, my point being if users are unwilling to differentiate between the two, they will inevitably run in to issues when conveying information to others
     
  4. BerserkLeon

    BerserkLeon MDL Novice

    Mar 21, 2012
    3
    0
    0
    Hi. Sorry if this has been answered but I don't have the time to read all 37 pages. (I read about the first 10 and the last 3)
    I want to use this on a 19041 Enterprise image made from uupdump
    I need the Store and to be able to sign in to the store.
    I believe I only removed recommended things, but with this, while I can run the store, I can not sign in, and as such cannot download my paid apps.

     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    Yeah, that seems broken for some reason. What I do is go to Settings, Accounts, Sign-in Options and sign in there, then I'm signed into the Microsoft Store as well and can download my paid apps.

    As well, make sure the Xbox Live Auth Manager service is starting automatically and running.
     
  6. BerserkLeon

    BerserkLeon MDL Novice

    Mar 21, 2012
    3
    0
    0
    Wow, that is a huge work-around. Switch from a local account to the MS account, swap back. Sign out/in. and ta-da - the sign in button actually does something in the store.
    Thank you, I've been trying to troubleshoot this for hours.
     
  7. drew84

    drew84 MDL Addicted

    Mar 13, 2014
    883
    1,345
    30
    .......... ?
     
  8. BerserkLeon

    BerserkLeon MDL Novice

    Mar 21, 2012
    3
    0
    0
    Ah... By store I meant Microsoft Store.
    I suppose you don't have to switch back to a local account after making your sign-in account into an MS account, which is what he described (or - the only related option available to me there), but I hate using the ms account to sign into my devices, particularly since my password for my live account is one of those complex random ones I use a password manager for.
     
  9. yatopp

    yatopp MDL Novice

    Jul 17, 2011
    35
    9
    0
    #729 yatopp, Jan 16, 2021
    Last edited: Jan 16, 2021
    Hey,

    I'm having issues with this script on 1809 LTSC. When I use a W10UI prepared iso without o-o'ing, it works fine.
    o-o builds fine with no errors. The errors come when trying to install (either on bare metal
    or in virtualbox). The setup gets to the "Just a moment" phase, which is quite late. It says "Windows could not complete the installation. To install Windows on this computer, restart the installation". Sometimes it just hangs for a LONG time on "just a moment". Pressing shift-f10 and reading the panther/UnattendGC/ error file on there tells me it failed to make a user account, and other oobe errors.

    Rebooting seems to help the process finish somewhat as it then installs, but i'm not sure to what state. The errors are still listed in the setuperror files. The virtualbox install fared better in that it seems to be working after that reboot, but bare metal is in worse shape. It never used to do that a couple weeks back when I tried it.

    I am using conservative options in the removing system apps: inputapp, AAD, BIO, EC, edgetoolkit, Addsugg, ContentDel, Fileexplorer, filepicker, parental, people, secure, xgpu, xbox, CBS.
    For Capabilities: QuickAssist, the 2 hello.face, onecoreUAP, OpenSSH.
    Packages: LanguageFeatures-Handwriting, TabletPCMath
    Optional features: XPS and workfolders.client
    Don't enable anything.

    I have included in a zip file the files that i modify, mainly to do with registry (remove some i want to keep) and some options in set-additional. The Configuration.json is also there. I use notepad++ for modifications. The ISO builds to just over 4GB, but the wim file is well under 4GB

    It used to work for a while with similar options, maybe I overlooked something?
     

    Attached Files:

    • oo.zip
      File size:
      19.3 KB
      Views:
      13
  10. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    Need to see your log of what you removed etc.
     
  11. yatopp

    yatopp MDL Novice

    Jul 17, 2011
    35
    9
    0
    Here are the o-o logs in a zip file
     

    Attached Files:

  12. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    #732 KedarWolf, Jan 17, 2021
    Last edited: Jan 17, 2021
    (OP)
    Below is what is absolutely safe to remove with zero issues, if you remove anything other than that, you're on your own. If you fix your ISO with only these from my list, then it is something to do with your other edits like the .ps1 or registry edits.

    Also, I recently found that .reg files placed in the D:\Optimize-Offline-4.0.1.7\Optimize-Offline-4.0.1.7\Content\Additional\RegistryTemplates\ folder are NOT being applied. I had to add the tweaks directly to the Additional Tweaks.reg file to get them to work.

    Code:
    ***************************************************************************************************
    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.1.7
    Optimize Start : 01/17/2021 01:38:37 PM
    Identity Name  : Kedar
    Computer Name  : KEDARWOLF
    ***************************************************************************************************
    
    2021-01-17T13:38:37 [INFO]: Supported Image Build: [19041]
    2021-01-17T13:38:40 [INFO]: Mounting Windows 10 Enterprise
    2021-01-17T13:39:07 [INFO]: Mounting Microsoft Windows Setup (x64)
    2021-01-17T13:39:15 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2021-01-17T13:39:40 [INFO]: Removing Provisioned App Package: CortanaApp.View.App
    2021-01-17T13:39:43 [INFO]: Removing Provisioned App Package: Microsoft.BingWeather
    2021-01-17T13:39:46 [INFO]: Removing Provisioned App Package: Microsoft.GetHelp
    2021-01-17T13:39:49 [INFO]: Removing Provisioned App Package: Microsoft.Getstarted
    2021-01-17T13:39:52 [INFO]: Removing Provisioned App Package: Microsoft.Microsoft3DViewer
    2021-01-17T13:39:55 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftOfficeHub
    2021-01-17T13:39:58 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftSolitaireCollection
    2021-01-17T13:40:01 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftStickyNotes
    2021-01-17T13:40:03 [INFO]: Removing Provisioned App Package: Microsoft.MixedReality.Portal
    2021-01-17T13:40:06 [INFO]: Removing Provisioned App Package: Microsoft.MSPaint
    2021-01-17T13:40:09 [INFO]: Removing Provisioned App Package: Microsoft.Office.OneNote
    2021-01-17T13:40:12 [INFO]: Removing Provisioned App Package: Microsoft.People
    2021-01-17T13:40:15 [INFO]: Removing Provisioned App Package: Microsoft.ScreenSketch
    2021-01-17T13:40:18 [INFO]: Removing Provisioned App Package: Microsoft.SkypeApp
    2021-01-17T13:40:21 [INFO]: Removing Provisioned App Package: Microsoft.Wallet
    2021-01-17T13:40:24 [INFO]: Removing Provisioned App Package: Microsoft.Windows.Photos
    2021-01-17T13:40:27 [INFO]: Removing Provisioned App Package: Microsoft.WindowsAlarms
    2021-01-17T13:40:30 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCalculator
    2021-01-17T13:40:33 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCamera
    2021-01-17T13:40:35 [INFO]: Removing Provisioned App Package: microsoft.windowscommunicationsapps
    2021-01-17T13:40:39 [INFO]: Removing Provisioned App Package: Microsoft.WindowsFeedbackHub
    2021-01-17T13:40:42 [INFO]: Removing Provisioned App Package: Microsoft.WindowsMaps
    2021-01-17T13:40:45 [INFO]: Removing Provisioned App Package: Microsoft.WindowsSoundRecorder
    2021-01-17T13:40:48 [INFO]: Removing Provisioned App Package: Microsoft.YourPhone
    2021-01-17T13:40:50 [INFO]: Removing Provisioned App Package: Microsoft.ZuneMusic
    2021-01-17T13:40:53 [INFO]: Removing Provisioned App Package: Microsoft.ZuneVideo
    2021-01-17T13:46:54 [INFO]: Removing System App: Microsoft.AAD.BrokerPlugin
    2021-01-17T13:46:56 [INFO]: Removing System App: Microsoft.BioEnrollment
    2021-01-17T13:46:58 [INFO]: Removing System App: Microsoft.ECApp
    2021-01-17T13:47:00 [INFO]: Removing System App: Microsoft.LockApp
    2021-01-17T13:47:02 [INFO]: Removing System App: Microsoft.MicrosoftEdge
    2021-01-17T13:47:04 [INFO]: Removing System App: Microsoft.MicrosoftEdgeDevToolsClient
    2021-01-17T13:47:06 [INFO]: Removing System App: Microsoft.Win32WebViewHost
    2021-01-17T13:47:08 [INFO]: Removing System App: Microsoft.Windows.AddSuggestedFoldersToLibarayDialog
    2021-01-17T13:47:10 [INFO]: Removing System App: Microsoft.Windows.CallingShellApp
    2021-01-17T13:47:12 [INFO]: Removing System App: Microsoft.Windows.ContentDeliveryManager
    2021-01-17T13:47:14 [INFO]: Removing System App: Microsoft.Windows.FileExplorer
    2021-01-17T13:47:16 [INFO]: Removing System App: Microsoft.Windows.FilePicker
    2021-01-17T13:47:19 [INFO]: Removing System App: Microsoft.Windows.ParentalControls
    2021-01-17T13:47:21 [INFO]: Removing System App: Microsoft.Windows.PeopleExperienceHost
    2021-01-17T13:47:23 [INFO]: Removing System App: Microsoft.Windows.SecHealthUI
    2021-01-17T13:47:25 [INFO]: Removing System App: Microsoft.Windows.SecureAssessmentBrowser
    2021-01-17T13:47:27 [INFO]: Removing System App: Microsoft.Windows.XGpuEjectDialog
    2021-01-17T13:47:29 [INFO]: Removing System App: MicrosoftWindows.Client.CBS
    2021-01-17T13:47:31 [INFO]: Removing System App: NcsiUwpApp
    2021-01-17T13:47:33 [INFO]: Removing System App: Windows.CBSPreview
    2021-01-17T13:47:36 [INFO]: Disabling Services, Drivers and Integration Content for Removed Apps.
    2021-01-17T13:47:42 [INFO]: Disabling Optional Feature: Windows-Defender-Default-Definitions
    2021-01-17T13:47:45 [INFO]: Importing Custom App Associations.
    2021-01-17T13:48:07 [INFO]: Removing Windows Capability: App.Support.QuickAssist
    2021-01-17T13:48:10 [INFO]: Removing Windows Capability: Hello.Face.18967
    2021-01-17T13:48:13 [INFO]: Removing Windows Capability: Hello.Face.Migration.18967
    2021-01-17T13:48:17 [INFO]: Removing Windows Capability: MathRecognizer
    2021-01-17T13:48:20 [INFO]: Removing Windows Capability: Microsoft.Windows.Notepad
    2021-01-17T13:48:23 [INFO]: Removing Windows Capability: Microsoft.Windows.WordPad
    2021-01-17T13:48:26 [INFO]: Removing Windows Capability: OneCoreUAP.OneSync
    2021-01-17T13:48:30 [INFO]: Removing Windows Capability: OpenSSH.Client
    2021-01-17T13:49:10 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-Handwriting-en-gb
    2021-01-17T13:49:14 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-OCR-en-gb
    2021-01-17T13:49:17 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-Speech-en-gb
    2021-01-17T13:49:25 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2021-01-17T13:49:36 [INFO]: Disabling Optional Feature: Printing-XPSServices-Features
    2021-01-17T13:49:39 [INFO]: Disabling Optional Feature: SmbDirect
    2021-01-17T13:49:50 [INFO]: Enabling Optional Feature: Microsoft-Windows-Subsystem-Linux
    2021-01-17T13:49:56 [INFO]: Integrating the Win32 Calculator.
    2021-01-17T13:49:59 [INFO]: Applying Optimized Registry Settings.
    2021-01-17T13:50:10 [INFO]: Applying Setup Content.
    2021-01-17T13:50:13 [INFO]: Applying Wallpaper.
    2021-01-17T13:50:16 [INFO]: Applying System Logo.
    2021-01-17T13:50:19 [INFO]: Applying Lock Screen.
    2021-01-17T13:50:23 [INFO]: Importing Registry Template: Additional Tweaks.reg
    2021-01-17T13:50:29 [INFO]: Applying Answer File.
    2021-01-17T13:50:32 [INFO]: Injecting Driver Packages into Windows 10 Enterprise
    2021-01-17T13:50:49 [INFO]: Injecting Driver Packages into Microsoft Windows Setup (x64)
    2021-01-17T13:51:07 [INFO]: Cleaning-up the Start Menu Layout.
    2021-01-17T13:51:10 [INFO]: Creating a Package Summary Log.
    2021-01-17T13:51:18 [INFO]: Post-Optimization Image Health State: [Healthy]
    2021-01-17T13:51:21 [INFO]: Saving and Dismounting Microsoft Windows Setup (x64)
    2021-01-17T13:51:49 [INFO]: Rebuilding and Exporting Microsoft Windows Setup (x64)
    2021-01-17T13:51:55 [INFO]: Saving and Dismounting Windows 10 Enterprise
    2021-01-17T13:53:04 [INFO]: Rebuilding and Exporting Windows 10 Enterprise using Solid compression.
    2021-01-17T14:00:09 [INFO]: Optimizing the Installation Media File Structure.
    2021-01-17T14:00:09 [INFO]: Creating a No-Prompt Bootable Windows Installation Media ISO.
    2021-01-17T14:00:19 [INFO]: Finalizing Optimizations.
    2021-01-17T14:00:19 [INFO]: Optimize-Offline completed in [22] minutes with [0] errors.
    
    ***************************************************************************************************
    Optimizations Finalized : 01/17/2021 02:00:19 PM
    ***************************************************************************************************
    
    
     
  13. zbigniew59

    zbigniew59 MDL Member

    May 14, 2016
    124
    26
    10
    Hello. I have a problem - after using the script - Set-Additional - I can not change, set the avatar in settings / account. As well as the login screen background in settings / personalization / login screen background. This script SWITCHES OFF SOMETHING - I don't know what - maybe someone knows what is responsible for it? For now, I have a workaround - after installation, I set these things up immediately and only then run scrypt. But after using the script, I can't change anything anymore. Can someone help? This optimize-offline is awesome! I've been using it for a long time in my language - pl-PL - and everything works great. I only have the problem I described.
     
  14. drew84

    drew84 MDL Addicted

    Mar 13, 2014
    883
    1,345
    30
    #734 drew84, Jan 20, 2021
    Last edited: Jan 21, 2021
    Some have been having issuues with the - Set-Additional switch for some time now... if you have a workaround it should point you in the right direction (when comparing your answer vs the script) to resolving the problem...
    ... it might be worth (for information purposes) posting your workaround here... and maybe a resolution could be found

    will have a look at the latest - Set-Additional to see if I can figure out the issue

    Lines 137 to 139 seems to be the only part that may be the cause of the issue

    ... (I think) you need to have a closer look at your Services.json and ScheduleTasks.json files configuration
     
  15. slowpork

    slowpork MDL Novice

    Dec 25, 2009
    4
    0
    0
    Hello. A quick question. I want to add Microsoft.AAD.BrokerPlugin on installed windows as I want to login MS school account. The system app was removed during O-O. I tried this powershell command but it gives error "Rejecting a request to register from Appxmanifest.xml because the manifest is not in the package root." Is there a quicker way to do than re-integrating ISO and reinstall windows? Best Regards,

    Code:
    PS C:\Windows\system32> if (-not (Get-AppxPackage Microsoft.AAD.BrokerPlugin)) { Add-AppxPackage -Register "$env:windir\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\Appxmanifest.xml" -DisableDevelopmentMode -ForceApplicationShutdown } Get-AppxPackage Microsoft.AAD.BrokerPlugin
    
    Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF9, Install failed. Please contact your software vendor.
    (Exception from HRESULT: 0x80073CF9)
    Rejecting a request to register from Appxmanifest.xml because the manifest is not in the package root.
    NOTE: For additional information, look for [ActivityId] ded24b91-f410-0006-2d54-d2de10f4d601 in the Event Log or use
    the command line Get-AppPackageLog -ActivityID ded24b91-f410-0006-2d54-d2de10f4d601
    At line:1 char:58
    + ... rPlugin)) { Add-AppxPackage -Register "$env:windir\SystemApps\Microso ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : WriteError: (C:\Windows\Syst...ppxmanifest.xml:String) [Add-AppxPackage], IOException
        + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
     
  16. zalim581

    zalim581 MDL Novice

    Aug 12, 2019
    17
    2
    0
    Anybody knows what causes action center not to open? It is something from Set-Additional.ps1 but im not sure which.
     
  17. stan456

    stan456 MDL Novice

    Jul 29, 2015
    9
    0
    0
    Any plans to support 19042?