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

    Gladuin MDL Novice

    Oct 8, 2017
    20
    6
    0
    I may have found out what's causing the problem. I just tried it again with explorer closed and defender disabled, the script failed again, so I closed it. Then after that I checked to see what files were being accessed by what process and I found out that a couple of files in the mounted directory were being accessed by the System (PID 4) process. I can't close this process because then my computer would shut down. Also the registry is accessing a bunch of files and hives in the mounted directory
     
  2. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,352
    2,308
    60
    @KedarWolf

    Your OP still shows 3.2.7.1 (current 3.2.7.6)

    Changelog
    Optimize-Offline 3.2.7.6

    The removal of Windows Capabilities has been moved to the new -Capabilities switch.
    The -Packages switch now allows for the removal of Feature, OnDemand and Language Packages.
    The Developer Mode Feature Package can now be integrated by using the new -DeveloperMode switch. Before integrating Developer Mode, read about it!
    Updated process logging and corrected an issue where an error would return when formatting an error record.
    Updated the package summary log creation process.
    Updated and improved the integration of a default LockScreen.
    Optimized the clean-up of any active mount points that are detected prior to the script initializing.
    When disabling Optional Features, their files are now also removed. This further reduces the size of the final optimized image.
    Updated the Data Deduplication firewall rules.
    Optimized and improved a lot of process code in the primary script and the module functions.

    3.2.7.5

    Updated multiple OfflineProcessing module functions.
    Added the ability to access protected offline registry keys.
    Updated the offline registry key values set during the integration of the Win32Calc designating as a System Application.

    3.2.7.4

    Created a custom Win32Calc.wim that replaces the official cabinet files for builds 17663+ for the integration of the Win32 Calculator.
    The custom Win32Calc.wim fixes an issue that is present in the OEM Win32Calc cabinet packages which cause the Win32 Calculator to crash when the conversion type is changed.
    Updated the registry optimizations applied when the -Registry switch is used.
    A custom LockScreen can now be applied to the image using the -Additional switch and its associated Config.ini by adding the custom LockScreen image to the new 'Content\Additional\LockScreen' folder.
    Updated multiple functions used with the OfflineProcessing module.



    3.2.7.3 (10-08-2019)

    Removed the disabling of the Clipboard feature with the -Registry switch.
    Updated the Start Menu layout clean-up.
    Updated the Windows Store bundle packages with their latest versions.
    Removed a redundant line of code.

    3.2.7.2 (09-17-2019)

    The Offline Processing Module has been renamed and restructured.
    Updated multiple functions.
    Corrected an issue preventing the WIM metadata log from being saved.
    Added a Refresh-Explorer.ps1, RebootToRecovery_MyPC.reg, SetupComplete.cmd and OOBE.cmd in the 'Additional\Setup' folder.
    Updated the 'Additional Tweaks.reg' file in the 'Additional\RegistryTemplates' folder.
    Made some minor updates and adjustments to the primary script.

    .... also, if anyone is having issues with this script... they are not reading the instructions
    have run this script on current 19013 (and installed/updated), wih only one issue, nothing to do with the script
    .... just MS trying to force an option that I am not happy with..
     
  3. Gladuin

    Gladuin MDL Novice

    Oct 8, 2017
    20
    6
    0
    #63 Gladuin, Nov 3, 2019
    Last edited: Nov 3, 2019
    I've fixed the issue by just editing the Optimize-Offline script to include what I need, and it worked flawlessly (apart from my LTSC ISO not including efisys_noprompt.bin, thus not building the optimized ISO)

    EDIT: Any Windows FoD Packages I can safely remove? I didn't remove any on my first try because I was scared that I could've broken the eventually live install but I'll need to optimize it again anyways so it can't hurt to try ;)
     
  4. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    OP updated including additional packages safe to remove.
     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    I opened a bug report on the GitHub, waiting for an answer.
     
  6. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    374
    171
    10
    This is the TranslucentTB program
     
  7. rentay

    rentay MDL Junior Member

    Dec 30, 2013
    88
    17
    0
    Which folder do you place the Set Privacy script? And which type do you use Default or Balanced?

    Also, do you have a link to the OneDrive script removal?
     
  8. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    The One Drive script in only found in older versions of Optimize Offline, but you can Google 'One Drive Removal Github' and find a script. For the Set Privacy script, I use Strong with zero issues.

    I use an unattend.xml file with Optimize Offline that sets up a local user, applies different tweaks and runs the Set Privacy script and OneDrive script and a few other scripts on the first login after installing Windows.
     
  9. rentay

    rentay MDL Junior Member

    Dec 30, 2013
    88
    17
    0
    Thanks!

    Any chance of sharing your unattend.xml script to get an idea of how you set it up?
     
  10. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    204
    10
    I had the same issue. What I did to resolve it was modify the batch file to include this option when executing powershell. -ISO "Prompt"
     
  11. SuperVas220

    SuperVas220 MDL Novice

    May 4, 2018
    8
    2
    0
    I have an issue too.

    I am editing LTSC 2019 64 bit ISO under the same os in Virtualbox 6.0.14 under updated Manjaro Linux.
    I set the 'WindowsApps' parameter in the CMD to 'Select', but the gridview did not appear. The were no log record for selecting windows apps for removal also.

    And two questions!

    I found that the created ISO is bootable only under UEFI systems, and not BIOS systems. This was determined under Virtualbox. The VM is not booting when set to BIOS mode. In EFI mode, it boots.
    Is this situation intentional? Also, it will be good to have a new parameter or question at the end to select the boot mode.

    The second question is about the new GUI version of the script. What are the plans for the new major release?
     
  12. bay12

    bay12 MDL Junior Member

    Nov 30, 2014
    84
    13
    0
    Hi all, i have a couple of questions regarding this tool:

    1) does the tool delete the "crap" from the iso making it slimmer or it just disable it?
    2) if i remove all the system apps and windows defender, once i install windows the disk space occupied will be as before or less?

    thanks all in advance for the answers
     
  13. SuperVas220

    SuperVas220 MDL Novice

    May 4, 2018
    8
    2
    0
    What I know is that the crap and the bloat are disabled, but they remain in the ISO, or almoust all of them. They do not get installed during the Windows installation. The tool deletes some other files from the ISO like Optional Features are now also removed from the ISO and some 3rd party files. This further reduces the size of the final optimized image. The reduction of the ISO size is not large, but the installed system is reduced more, because some or many components are not installed, especially if you modify the HOME or PRO versions of the Windows 10.

    Removing ALL system apps is not recommended, but Defender is good to be removed.

    The author of this tool can say more about the size reduction and also for the GUI version. But I think that if components are disabled and they are not searched during installation procedure, they can be deleted from the ISO, also.
     
  14. bay12

    bay12 MDL Junior Member

    Nov 30, 2014
    84
    13
    0

    Thanks, i tried myself last night (although i didn't use this tool, but an inbox apps script remover found on this forum) and the apps are getting unregistered from the windows registry but not deleted from the windows\systemapps folder.
    If i delete them manually (even if not registered in the registry) then sfc /verifyonly finds errors.
     
  15. PsychedelicShaman

    PsychedelicShaman MDL Member

    Dec 4, 2017
    134
    318
    10
    That's right, it's better to just remove them from provisioning in the offline registry hives and to leave the appx files alone - this is the "cleanest" way to get rid of UWP/System apps and Windows Updates shouldn't reinstall them.

    Clean way prevent Inbox Apps from being deployed by abbodi1406