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

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
    I open the file "Start-Optimize.ps1" with PoweShell. It opens and closes immediately....
     
  2. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    Are you using Windows 10 and running PowerShell as Admin?
     
  3. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
    open powershell, change directory to location of "Start-Optimize.ps1", execute it, now (hopefully) you'll see the error that it's reporting
     
  4. KingOfDecepton

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
    Yes!
     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
  6. KingOfDecepton

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
    ObjectNotFound: (Start-Optimize.ps1:String) [], CommandNotFoundException
     
  7. KingOfDecepton

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
  8. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
    what's your Configuration.json look like?
     
  9. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
  10. KingOfDecepton

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
    {
    "_Info": [
    "This is a JSON based Configuration file for Optimize-Offline.",
    "Ensure proper formatting is used when editing the JSON parameter values.",
    "Boolean parameter values use true and false. String parameter values must be enclosed in double-quotes."
    ],
    "SourcePath": "E:\\1\\Win.iso",
    "WindowsApps": "All",
    "SystemApps": true,
    "Capabilities": true,
    "Packages": true,
    "Features": true,
    "DeveloperMode": false,
    "WindowsStore": false,
    "MicrosoftEdge": false,
    "Win32Calc": true,
    "Dedup": false,
    "DaRT": [
    ],
    "Registry": true,
    "Additional": {
    "Setup": false,
    "Wallpaper": false,
    "SystemLogo": false,
    "LockScreen": false,
    "RegistryTemplates": false,
    "LayoutModification": false,
    "Unattend": false,
    "Drivers": false,
    "NetFx3": false
    },
    "ComponentCleanup": false,
    "ISO": "No-Prompt"
    }
     
  11. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    Better to insert the stuff as code like below or formatting gets messed up. Then we can tell better if there are any errors.

    Code:
    {
      "_Info": [
        "This is a JSON based Configuration file for Optimize-Offline.",
        "Ensure proper formatting is used when editing the JSON parameter values.",
        "Boolean parameter values use true and false. String parameter values must be enclosed in double-quotes."
      ],
      "SourcePath": "C:\\Users\\Kedar\\Downloads\\en_windows_10_business_editions_version_21h1_updated_jun_2021_x64_dvd_8222df3d.iso",
      "WindowsApps": "Select",
      "SystemApps": true,
      "Capabilities": true,
      "Packages": true,
      "Features": true,
      "DeveloperMode": false,
      "WindowsStore": false,
      "MicrosoftEdge": false,
      "Win32Calc": true,
      "Dedup": false,
      "DaRT": [
      ],
      "Registry": true,
      "Additional": {
        "Setup": true,
        "Wallpaper": false,
        "SystemLogo": false,
        "LockScreen": false,
        "RegistryTemplates": true,
        "LayoutModification": false,
        "Unattend": false,
        "Drivers": true,
        "NetFx3": true
      },
      "ComponentCleanup": false,
      "ISO": "No-Prompt"
    }
     
  12. KingOfDecepton

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
    Code:
    {
      "_Info": [
        "This is a JSON based Configuration file for Optimize-Offline.",
        "Ensure proper formatting is used when editing the JSON parameter values.",
        "Boolean parameter values use true and false. String parameter values must be enclosed in double-quotes."
      ],
      "SourcePath": "E:\\1\\Win.iso",
      "WindowsApps": "All",
      "SystemApps": true,
      "Capabilities": true,
      "Packages": true,
      "Features": true,
      "DeveloperMode": false,
      "WindowsStore": false,
      "MicrosoftEdge": false,
      "Win32Calc": true,
      "Dedup": false,
      "DaRT": [
      ],
      "Registry": true,
      "Additional": {
        "Setup": false,
        "Wallpaper": false,
        "SystemLogo": false,
        "LockScreen": false,
        "RegistryTemplates": false,
        "LayoutModification": false,
        "Unattend": false,
        "Drivers": false,
        "NetFx3": false
      },
      "ComponentCleanup": false,
      "ISO": "No-Prompt"
    }
    
     
  13. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
    mount the ISO, then run
    Code:
    dism /Get-WimInfo /WimFile:x:\sources\install.wim /index:1
    at admin CMD (x=mounted drive) and report what you see.
     
  14. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    #834 KedarWolf, Jul 2, 2021
    Last edited: Jul 2, 2021
    (OP)
    https://forums.mydigitallife.net/th...-20h1-and-ltsc-2019.80038/page-8#post-1569377

    Code:
    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
    Run that before you run the script.
     
  15. Mavericks Choice

    Mavericks Choice MDL Guru

    Aug 5, 2015
    3,323
    13,918
    120
    Try calling the script like this it will pause & show any errors.

     
  16. zalim581

    zalim581 MDL Novice

    Aug 12, 2019
    30
    6
    0
    I just tried with an english ISO. Same error.
     
  17. zalim581

    zalim581 MDL Novice

    Aug 12, 2019
    30
    6
    0
    Powershell accepts unix like paths so type in
    Code:
    ./Start-Optimize.ps1
    not
    Code:
    Start-Optimize.ps1
     
  18. zalim581

    zalim581 MDL Novice

    Aug 12, 2019
    30
    6
    0
    I changed my Windows' language to en-us and finally it worked fine.
     
  19. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    #840 KedarWolf, Jul 3, 2021
    Last edited: Jul 7, 2021
    (OP)
    If anyone wants a Windows 11 ISO that doesn't require TPM or Secure Boot enabled, add the following lines to the \Optimize-Offline-4.0.1.8\Optimize-Offline-4.0.1.8\Content\Additional\RegistryTemplates\Additional Tweaks.reg file.

    Code:
    [HKLM\SYSTEM\Setup\LabConfig]
    "BypassTPMCheck"=dword:00000001
    "BypassSecureBootCheck"=dword:00000001
    "BypassRAMCheck" = dword: 00000001
    "BypassStorageCheck" = dword: 00000001