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. Mavericks Choice

    Mavericks Choice MDL Guru

    Aug 5, 2015
    2,908
    12,465
    90
    Used the latest commit with same selections & took 9 mins to complete, approx. 1 min longer than previous, all worked & no errors.
     
  2. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    I have fixed the errors not showing into the console. All exception messages were being ignored. Check once more now, if you see an error popping in the embedded console.
     
  3. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    #2083 KedarWolf, Nov 21, 2022
    Last edited: Nov 21, 2022
    (OP)
    @gdeliana

    Can you check to see why there are always Files In Use after you close the OO GUI and try copying the entire OO folder somewhere else or try to delete it?

    I need to reboot to fix it. :(
     
  4. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    @gdeliana

    Really weird thing.

    If I have UEFI in the configuration.json and have UEFI in the GUI, after I select the USB and run the GUI, when I install Windows, it's a completely stock Windows ISO with no tweaks, registry templates, or answer file installed.

    Also if I burn the ISO manually with RUFUS it's a completely stock one. It even forces me to enable fTPM. It makes me go through the initial Windows setup that normally my answer file skips and my drivers from the GUI are not installed because it says I have no Internet connection.

    If I have it Off in the configuration.json and don't select the USB in the GUI and burn the created ISO with RUFUS, everything thing is fine. My answer file, all the registry templates, and all the tweaks applied. It also doesn't force me to enable fTPM.

    It's like the USB option is downloading a completely stock ISO or something and replacing the one made with the GUI. It even has both Enterprise/IoT Enterprise selections when I go to install Windows. The working GUI one with no create USB option just installs IoT with no other option.

    I'm using Windows 22000.1281 IoT.

    Edit: It has no taskbar, file explorer tweaks, and no Run Powershell As Trusted Installer or Run CMD As Admin, nada.
     
  5. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    #2085 gdeliana, Nov 21, 2022
    Last edited: Nov 21, 2022
    That is what i am dealing with now, but you said that this happened with a space in the dir path of the OO tool?

    EDIT: I think i fixed the whitespace issues, can you check now if the file gets deleted properly?
     
  6. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    No, it happens even with no spaces in the folder name.
     
  7. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    #2087 gdeliana, Nov 22, 2022
    Last edited: Nov 23, 2022
    Edited: Its fixed now, i had for some weird reason the noexit param in Start-Gui.bat
    So now you can delete the folder as all the resources using it will be freed.
     
  8. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    #2089 gdeliana, Nov 23, 2022
    Last edited: Nov 23, 2022
    Hello there,

    For now there is a pretty basic UI, use it like this:

    Code:
    ./Start-GUI.bat
    This is only in the master branch, no release yet.

    Edit: Readme.md updated with GUI instructions
     
  9. anna199095

    anna199095 MDL Junior Member

    Jun 25, 2018
    73
    14
    0
    Hanks alot. Defenetly will try it out. Have a good reason. After own manual optimization and "S... script's" experiencing weirdly prolonged delays during restarts.
     
  10. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    I think the culprit is removing Microsoft.AsyncTextService, this makes a task in: \Microsoft\Windows\International\Synchronize Language Settings run when you restart the pc. Test different removals in a VM. Removing system apps is only for advanced users that must know what those components serve for in the system.
     
  11. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    This one i cannot replicate, just test once more with the latest master, maybe its related to one of the fixes i made.
     
  12. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
  13. anna199095

    anna199095 MDL Junior Member

    Jun 25, 2018
    73
    14
    0
    Yeah, you are 110% right. Hanks again
     
  14. anna199095

    anna199095 MDL Junior Member

    Jun 25, 2018
    73
    14
    0
    Is there a command line to delete this serivce (maybe wif package as well) ? Pretty please ... Hanks alot.
     
  15. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    Just use this command in powershell admin mode:
    Code:
    Get-ScheduledTask -TaskName "Synchronize Language Settings" | Unregister-ScheduledTask -Confirm:$false
    In the near future i may as well add a feature to manage scheduled tasks in an offline install
     
  16. anna199095

    anna199095 MDL Junior Member

    Jun 25, 2018
    73
    14
    0
    Hanks Alot again! Also found this "Uninstall-WindowsFeature" and thru sc. Gotta try them all out.
     
  17. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    Everything clickable in windows has a powershell counterpart :p
     
  18. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    #2099 gdeliana, Nov 26, 2022
    Last edited: Nov 26, 2022
  19. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    204
    10
    #2100 strotee, Nov 26, 2022
    Last edited: Nov 26, 2022
    I'm experiencing this weird issue with v7 that I never experienced with v6.2. What I do is copy Content\Lists\* & Configuration.json from one version to the next. v7 is not reporting any errors but what it's doing is running very fast.

    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.1.9
    Optimize Start : 11/24/2022 10:02:10 AM
    Identity Name : strotee
    Computer Name : DESKTOP-OLU3K2R
    ***************************************************************************************************

    2022-11-24T10:02:10 [INFO]: Supported Image Build: [19041]
    2022-11-24T10:02:13 [INFO]: Mounting Windows 10 IoT Enterprise LTSC
    2022-11-24T10:04:14 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2022-11-24T10:04:29 [INFO]: Removing System App: Microsoft.AAD.BrokerPlugin
    2022-11-24T10:04:31 [INFO]: Removing System App: Microsoft.BioEnrollment
    2022-11-24T10:04:33 [INFO]: Removing System App: Microsoft.ECApp
    2022-11-24T10:04:35 [INFO]: Removing System App: Microsoft.LockApp
    2022-11-24T10:04:37 [INFO]: Removing System App: Microsoft.MicrosoftEdge
    2022-11-24T10:04:39 [INFO]: Removing System App: Microsoft.MicrosoftEdgeDevToolsClient
    2022-11-24T10:04:41 [INFO]: Removing System App: Microsoft.Win32WebViewHost
    2022-11-24T10:04:43 [INFO]: Removing System App: Microsoft.Windows.AddSuggestedFoldersToLibarayDialog
    2022-11-24T10:04:45 [INFO]: Removing System App: Microsoft.Windows.CallingShellApp
    2022-11-24T10:04:47 [INFO]: Removing System App: Microsoft.Windows.ContentDeliveryManager
    2022-11-24T10:04:49 [INFO]: Removing System App: Microsoft.Windows.FileExplorer
    2022-11-24T10:04:51 [INFO]: Removing System App: Microsoft.Windows.FilePicker
    2022-11-24T10:04:53 [INFO]: Removing System App: Microsoft.Windows.ParentalControls
    2022-11-24T10:04:55 [INFO]: Removing System App: Microsoft.Windows.PeopleExperienceHost
    2022-11-24T10:04:57 [INFO]: Removing System App: Microsoft.Windows.XGpuEjectDialog
    2022-11-24T10:04:59 [INFO]: Removing System App: Microsoft.XboxGameCallableUI
    2022-11-24T10:05:01 [INFO]: Removing System App: MicrosoftWindows.Client.CBS
    2022-11-24T10:05:03 [INFO]: Removing System App: Windows.CBSPreview
    2022-11-24T10:05:06 [INFO]: Disabling Services, Drivers and Integration Content for Removed Apps.
    2022-11-24T10:05:07 [INFO]: Applying Windows Maps removal tweak
    2022-11-24T10:05:08 [INFO]: Applying Microsoft Wallet removal tweak
    2022-11-24T10:05:09 [INFO]: Applying Xbox apps removal tweak
    2022-11-24T10:05:10 [INFO]: Applying YourPhone removal tweak
    2022-11-24T10:05:11 [INFO]: Applying Microsoft Edge removal tweak
    2022-11-24T10:05:12 [INFO]: Applying Microsoft BioEnrollment removal tweak
    2022-11-24T10:05:13 [INFO]: Applying ContentDeliveryManager removal tweak
    2022-11-24T10:05:25 [INFO]: Removing Windows Biometric Capability: Hello.Face.18967~~~~0.0.1.0
    2022-11-24T10:05:33 [INFO]: Removing Windows Biometric Capability: Hello.Face.Migration.18967~~~~0.0.1.0
    2022-11-24T10:05:42 [INFO]: Importing Custom App Associations.
    2022-11-24T10:05:51 [INFO]: Removing Windows Capability: App.StepsRecorder~~~~0.0.1.0
    2022-11-24T10:05:57 [INFO]: Removing Windows Capability: App.Support.QuickAssist~~~~0.0.1.0
    2022-11-24T10:06:04 [INFO]: Removing Windows Capability: OneCoreUAP.OneSync~~~~0.0.1.0
    2022-11-24T10:06:13 [INFO]: Removing Windows Capability: OpenSSH.Client~~~~0.0.1.0
    2022-11-24T10:06:25 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1
    2022-11-24T10:06:31 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-OCR-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1
    2022-11-24T10:06:38 [INFO]: Removing Windows Package: Microsoft-Windows-LanguageFeatures-Speech-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1
    2022-11-24T10:06:55 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2022-11-24T10:07:06 [INFO]: Disabling Optional Feature: MSRDC-Infrastructure
    2022-11-24T10:07:13 [INFO]: Disabling Optional Feature: Printing-Foundation-Features
    2022-11-24T10:07:19 [INFO]: Disabling Optional Feature: Printing-Foundation-InternetPrinting-Client
    2022-11-24T10:07:25 [INFO]: Disabling Optional Feature: Printing-PrintToPDFServices-Features
    2022-11-24T10:07:31 [INFO]: Disabling Optional Feature: Printing-XPSServices-Features
    2022-11-24T10:07:38 [INFO]: Disabling Optional Feature: SmbDirect
    2022-11-24T10:07:45 [INFO]: Disabling Optional Feature: WorkFolders-Client
    2022-11-24T10:07:57 [INFO]: Enabling Optional Feature: DirectPlay
    2022-11-24T10:08:05 [INFO]: Enabling Optional Feature: LegacyComponents
    2022-11-24T10:08:12 [INFO]: Applying Optimized Registry Settings.
    2022-11-24T10:08:16 [INFO]: Importing Registry Template: WindowsPhotoViewer.reg
    2022-11-24T10:08:20 [INFO]: Applying Setup Content.
    2022-11-24T10:08:23 [INFO]: Importing Registry Template: Additional Tweaks.reg
    2022-11-24T10:08:30 [INFO]: Disabling Windows Upgrade
    2022-11-24T10:08:31 [INFO]: Disabling automatic driver update
    2022-11-24T10:08:32 [INFO]: Enabling dormant OneDrive fix
    2022-11-24T10:08:33 [INFO]: Setting classic search explorer
    2022-11-24T10:08:35 [INFO]: Removing taskbar pinned icons
    2022-11-24T10:08:36 [INFO]: Disabling Microsoft Teams autostart entry
    2022-11-24T10:08:38 [INFO]: Enabling explorer classic UI ribbon
    2022-11-24T10:08:40 [INFO]: Adding Powershell as trusted installer context menu entry
    2022-11-24T10:08:41 [INFO]: Importing Registry Template: RunAsTi.reg
    2022-11-24T10:08:45 [INFO]: Cleaning-up the Start Menu Layout.
    2022-11-24T10:08:48 [INFO]: Creating a Package Summary Log.
    2022-11-24T10:08:52 [INFO]: Post-Optimization Image Health State: [Healthy]
    2022-11-24T10:08:55 [INFO]: Saving and Dismounting Windows 10 IoT Enterprise LTSC
    2022-11-24T10:11:01 [INFO]: Rebuilding and Exporting Windows 10 IoT Enterprise LTSC using Maximum compression.
    2022-11-24T10:11:52 [INFO]: Optimizing the Installation Media File Structure.
    2022-11-24T10:11:53 [INFO]: Creating a Prompt Bootable Windows Installation Media ISO.
    2022-11-24T10:12:38 [INFO]: Finalizing Optimizations.
    2022-11-24T10:12:39 [INFO]: Optimize-Offline completed in [10] minutes with [0] errors.

    ***************************************************************************************************
    Optimizations Finalized : 11/24/2022 10:12:39 AM
    ***************************************************************************************************

    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.1.9
    Optimize Start : 11/24/2022 10:15:36 AM
    Identity Name : strotee
    Computer Name : DESKTOP-OLU3K2R
    ***************************************************************************************************

    2022-11-24T10:15:36 [INFO]: Supported Image Build: [19041]
    2022-11-24T10:15:39 [INFO]: Mounting Windows 10 IoT Enterprise LTSC
    2022-11-24T10:17:43 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2022-11-24T10:17:59 [INFO]: Applying Windows Maps removal tweak
    2022-11-24T10:18:00 [INFO]: Applying Microsoft Wallet removal tweak
    2022-11-24T10:18:01 [INFO]: Applying Xbox apps removal tweak
    2022-11-24T10:18:02 [INFO]: Applying YourPhone removal tweak
    2022-11-24T10:18:03 [INFO]: Applying ContentDeliveryManager removal tweak
    2022-11-24T10:18:06 [INFO]: Importing Custom App Associations.
    2022-11-24T10:18:28 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2022-11-24T10:18:43 [INFO]: Disabling Optional Feature: MSRDC-Infrastructure
    2022-11-24T10:18:50 [INFO]: Disabling Optional Feature: Printing-Foundation-Features
    2022-11-24T10:18:57 [INFO]: Disabling Optional Feature: Printing-Foundation-InternetPrinting-Client
    2022-11-24T10:19:02 [INFO]: Disabling Optional Feature: Printing-PrintToPDFServices-Features
    2022-11-24T10:19:09 [INFO]: Disabling Optional Feature: Printing-XPSServices-Features
    2022-11-24T10:19:15 [INFO]: Disabling Optional Feature: SmbDirect
    2022-11-24T10:19:22 [INFO]: Disabling Optional Feature: WorkFolders-Client
    2022-11-24T10:19:34 [INFO]: Enabling Optional Feature: DirectPlay
    2022-11-24T10:19:42 [INFO]: Enabling Optional Feature: LegacyComponents
    2022-11-24T10:19:48 [INFO]: Applying Optimized Registry Settings.
    2022-11-24T10:19:52 [INFO]: Importing Registry Template: WindowsPhotoViewer.reg
    2022-11-24T10:19:56 [INFO]: Applying Setup Content.
    2022-11-24T10:19:59 [INFO]: Importing Registry Template: Additional Tweaks.reg
    2022-11-24T10:20:06 [INFO]: Disabling Windows Upgrade
    2022-11-24T10:20:07 [INFO]: Disabling automatic driver update
    2022-11-24T10:20:08 [INFO]: Enabling dormant OneDrive fix
    2022-11-24T10:20:09 [INFO]: Setting classic search explorer
    2022-11-24T10:20:11 [INFO]: Removing taskbar pinned icons
    2022-11-24T10:20:12 [INFO]: Disabling Microsoft Teams autostart entry
    2022-11-24T10:20:14 [INFO]: Enabling explorer classic UI ribbon
    2022-11-24T10:20:17 [INFO]: Adding Powershell as trusted installer context menu entry
    2022-11-24T10:20:17 [INFO]: Importing Registry Template: RunAsTi.reg
    2022-11-24T10:20:21 [INFO]: Cleaning-up the Start Menu Layout.
    2022-11-24T10:20:24 [INFO]: Creating a Package Summary Log.
    2022-11-24T10:20:29 [INFO]: Post-Optimization Image Health State: [Healthy]
    2022-11-24T10:20:32 [INFO]: Saving and Dismounting Windows 10 IoT Enterprise LTSC
    2022-11-24T10:22:40 [INFO]: Rebuilding and Exporting Windows 10 IoT Enterprise LTSC using Maximum compression.
    2022-11-24T10:23:30 [INFO]: Optimizing the Installation Media File Structure.
    2022-11-24T10:23:30 [INFO]: Creating a Prompt Bootable Windows Installation Media ISO.
    2022-11-24T10:24:15 [INFO]: Finalizing Optimizations.
    2022-11-24T10:24:15 [INFO]: Optimize-Offline completed in [9] minutes with [0] errors.

    ***************************************************************************************************
    Optimizations Finalized : 11/24/2022 10:24:15 AM
    ***************************************************************************************************

    Code:
    {
      "_Info": [],
      "SourcePath": "Z:\\Projects\\OS\\Windows\\10\\19044.2311.iso",
      "WindowsApps": "Blacklist",
      "SystemApps": "Blacklist",
      "Capabilities": "Blacklist",
      "Packages": "Blacklist",
      "FeaturesToEnable": "List",
      "FeaturesToDisable": "List",
      "DaRT": [],
      "Registry": true,
      "OutputPath": "Z:\\Projects\\OS\\Windows\\10\\19044.2311.opt.iso",
      "Additional": {
        "Setup": true,
        "RegistryTemplates": true
      },
      "ISO": "Prompt",
      "CompressionType": "Maximum",
      "SelectiveRegistry": {
        "DisableWindowsUpgrade": true,
        "DisableDriverUpdate": true,
        "DormantOneDrive": true,
        "Disable3rdPartyApps": true,
        "ExplorerUIRibbon": true,
        "ClassicSearchExplorer": true,
        "RemoveTaskbarPinnedIcons": true,
        "DisableTeamsApp": true,
        "DisableVirtualizationSecurity": true,
        "RunAsTiContextMenu": true
      },
      "ShutDownOnComplete": false,
      "FlashToUSB": "Off"
    }