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

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    #1781 KedarWolf, Apr 4, 2022
    Last edited: Apr 4, 2022
    (OP)
    @gdeliana

    The below removes the Unsupported Hardware watermark in Windows 11 for both 22000 and 25H1

    Would be good to add.


    https://forums.mydigitallife.net/th...fications-overview.83744/page-55#post-1728630

    Code:
    reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /d 0 /t reg_dword /f
    reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /d 0 /t reg_dword /f
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "TargetReleaseVersion" /d 1 /t reg_dword /f
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "TargetReleaseVersionInfo" /d 25H1 /f
    
     
  2. Mavericks Choice

    Mavericks Choice MDL Guru

    Aug 5, 2015
    2,908
    12,461
    90
    The latest commits wash all my previous error that I xp, the error never gave any probs whatsoever with the live OS though.
     
  3. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    #1783 KedarWolf, Apr 5, 2022
    Last edited: Apr 5, 2022
    (OP)
    Latest commits.

    Code:
    Index     : 0
    Exception : The parameter is incorrect.
               
    Category  : OpenError: (HKEY_LOCAL_MACH...\InprocServer32:String) [New-Item], IOException
    ErrorID   : System.IO.IOException,Microsoft.PowerShell.Commands.NewItemCommand
    Target    : HKEY_LOCAL_MACHINE\WIM_HKLM_SOFTWARE\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32
    Command   : [Void](New-Item -Path $Key -ItemType Directory -Force -ErrorAction:$ErrorActionPreference |
                New-ItemProperty -Name $Name -Value $Value -PropertyType $Type -Force -ErrorAction:$ErrorActionPreference)
    Script    : D:\Optimize-Offline-master\Src\Public\Set-KeyProperty.ps1
    Line      : 48
    Column    : 24
    
    Maybe:

    Code:
    HKCU\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32
     
  4. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    Which windows build did you run the script on?
     
  5. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    Ok this tweak is meant to introduce the ribbon in explorer. In 22500+ it didn't work anymore. I will check maybe this needs to be updated already. Ah Microsoft... again.
    If you find the reg key that works on live system let me know.
     
  6. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
  7. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    @KedarWolf

    Ok so to sum up what i made in the last commit:

    • I couldn't reproduce the Explorer UI ribbon reg key bug, i tried with another key (commented in code) but it didn't show at all the UI ribbon. The one i have active showed me the ribbon in 22000.593. You can uncomment the reg key that didn't work for me and try it.
    • Added AMOLED theme tweak, seems to work in 22000.593. Thanks to @BAU @KedarWolf
    • Added the removal tweak of the watermark of system requirements (W11). Thanks to @BAU @KedarWolf
    • Added disable virtualization security tweak - not sure yet about this one, but is meant to do a similar job like the toggle in secHealthUI app named Core Isolation. According to google this should give at max some 3% increase of performance in games, by sacrificing your system security. If anyone likes this let's make some benchmarks and check it.
    Am planning a simple HTML gui, running in a browser window, basically as a web developer, am very familiar with JS and HTML, so why not do it :)
     
  8. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    I can't use the tweak. Get that IOException error still. I'm on 22000.593 IoT, not sure if that's why.

    To get around it, terrible hack I know, I can't get it to work in the script, is to add the below to my answer file, a SyncronousCommand.

    Edit: I add all the updates with W10UI.

    Code:
    reg.exe add "HKCU\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32" /f /ve
     
  9. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    The problem with the line of code is that it applies only to online installations, for the offline method
    I cannot add that line like that, i need to convert the reg key to one compatible with the hives mountings in OO tool.
    According to Import-Registry method in the tool HKCU is converted like this:
    Code:
    $REGContent = $REGContent -replace 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE\WIM_HKCU'
    And that is what i have there:
    Code:
    RegKey -Path "HKLM:\WIM_HKCU\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32" -Name "(default)" -Value "" -Type String -Force
    Except that this didn't work for me on a live system. You can try this for yourself in your build.
     
  10. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    #1794 KedarWolf, Apr 7, 2022
    Last edited: Apr 7, 2022
    (OP)
    @gdeliana

    Apparently, this is the proper tweak for the ClassicUI Ribbon. I'm importing it right now, set it up in OO like the other imported .reg files. Testing in VMWare in a few minutes.

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
    "{e2bf9676-5f8f-435c-97eb-11607a5bedf7}"=""
    I think I found the fix for your tweak without importing a .reg file in OO, testing now in VMware in a few minutes.

    Nope, I tried everything, but any version of Classic UI Ribbon tweak I get an Open:error IOException unless I make a .reg file and have OO import it like the RunAsTi.reg etc. :(

    Testing now to see if the imported .reg file works.
     
  11. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    #1795 KedarWolf, Apr 7, 2022
    Last edited: Apr 7, 2022
    (OP)
    So, new post.

    It won't let me Bold the code I inserted, but it's the parts with ClassicFileExplorer in it.

    The only way I could get the Classic UI Ribbon to work was with the below edits and disabling and eventually removing the ExplorerUIRibbon tweak code.

    At the end of the SelectiveRegistry.ps1

    Code:
    if($SelectiveRegistry.AmoledBlackTheme -and $Global:InstallInfo.Build -ge '10240') {
        Log $OptimizeData.SelectiveRegistryAmoledBlackTheme
        Import-Registry -Path (Get-ChildItem -Path $OptimizeOffline.SelectiveRegistry -Filter AMOLED_black_theme.reg).FullName
        Start-Sleep 1
    }
    
    if($SelectiveRegistry.ClassicFileExplorer -and $Global:InstallInfo.Build -eq '22000') {
        Log $OptimizeData.SelectiveRegistryClassicFileExplorer
        Import-Registry -Path (Get-ChildItem -Path $OptimizeOffline.SelectiveRegistry -Filter ClassicFileExplorer.reg).FullName
        Start-Sleep 1
    }
    
    RegHives -Unload
    
    Clear-Host
    
    Add this part to the Optimize-Offline.psm1
    Code:
    [Hashtable]$SelectiveRegistry = @{
                DisableWindowsUpgrade = $false
                DisableWindowsUpdateMicrosoft = $false
                DisableDriverUpdate = $false
                DormantOneDrive = $false
                Disable3rdPartyApps = $false
                W11ClassicContextMenu = $false
                ClassicSearchExplorer = $false
                RemoveTaskbarPinnedIcons = $false
                DisableTeamsApp = $false
                DisableVirtualizationSecurity = $false
                RunAsTiContextMenu = $false
                AmoledBlackTheme = $false
                ClassicFileExplorer = $false
            },
    Adding this to the Optimize-Offline.strings.psd1

    Code:
    SelectiveRegistryWindowsUpgrade         = Disabling Windows Upgrade
    SelectiveRegistryWindowsUpdateMS        = Disabling Windows Update using Microsoft's Method
    SelectiveRegistryDriverUpdate           = Disabling automatic driver update
    SelectiveRegistryDormantOneDrive        = Enabling dormant OneDrive fix
    SelectiveRegistryDisable3rdPartyApps    = Disabling 3rd party apps
    SelectiveRegistryW11ClassicContextMenu  = Setting W11 classic context menu
    SelectiveRegistryRemoveTaskbarPinnedIcons = Removing taskbar pinned icons
    SelectiveRegistryDisableVirtualizationSecurity = Disabling virtualization security
    SelectiveRegistryAmoledBlackTheme       = Adding AMOLED pitch-black theme
    SelectiveRegistryClassicFileExplorer      = Enabling explorer classic UI ribbon
    SelectiveRegistryClassicSearchExplorer  = Setting classic search explorer
    SelectiveRegistryDisableTeamsApp        = Disabling Microsoft Teams autostart entry
    SelectiveRegistryRunAsTiContextMenu     = Adding Powershell as trusted installer context menu entry
    
    And the configuration.json.

    Code:
    "SelectiveRegistry": {
        "DisableWindowsUpgrade": false,
        "DisableWindowsUpdateMicrosoft": false,
        "DisableDriverUpdate": true,
        "DormantOneDrive": true,
        "Disable3rdPartyApps": true,
        "W11ClassicContextMenu": true,
        "ClassicSearchExplorer": true,
        "RemoveTaskbarPinnedIcons": true,
        "DisableTeamsApp": true,
        "DisableVirtualizationSecurity": true,
        "RunAsTiContextMenu": true,
        "AmoledBlackTheme": true,
        "ClassicFileExplorer": true
    oh, and this ClassicFileExplorer.reg file.

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
    "{e2bf9676-5f8f-435c-97eb-11607a5bedf7}"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
    "{e2bf9676-5f8f-435c-97eb-11607a5bedf7}"=""
    
     
  12. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
    I think unfortunately the problem is with the windows build you are trying. I made a release for now, if you happen to find the right tweak, let me know :)
    Or after all Win 11 Pro 22591 is a great choice with the new uup-dump not integrating apps :D
     
  13. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    363
    410
    10
  14. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    374
    171
    10
  15. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,351
    2,307
    60
    #1800 drew84, Apr 7, 2022
    Last edited: Apr 7, 2022
    Hazzarding a guess "C:\................Gdeliana-5\./start-optimize"

    not sure why you are using nsudo when there is a more refined solution
    (C:\Windows\NSudo>cd C:\Optimize-Offline-4.0.1.9-gdeliana-5\./Start-Optimize-BAU-TI)
    that can be run directly from within the Optimize-Offline folder?