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

    zbigniew59 MDL Member

    May 14, 2016
    130
    39
    10
    I have been using this script for a long time and I confirm that after appropriate modifications the newest scrypt works for me flawlessly on my iso pl-PL.
    I even debloated Win 11 without any errors.
     
  2. KingOfDecepton

    KingOfDecepton MDL Novice

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

    KedarWolf MDL Addicted

    Mar 17, 2016
    533
    415
    30
    Are you using Windows 10 and running PowerShell as Admin?
     
  4. strotee

    strotee MDL Member

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

    KingOfDecepton MDL Novice

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

    KedarWolf MDL Addicted

    Mar 17, 2016
    533
    415
    30
  7. KingOfDecepton

    KingOfDecepton MDL Novice

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

    KingOfDecepton MDL Novice

    Jul 1, 2021
    8
    0
    0
  9. strotee

    strotee MDL Member

    Jan 30, 2011
    120
    124
    10
    what's your Configuration.json look like?
     
  10. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    533
    415
    30
  11. 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"
    }
     
  12. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    533
    415
    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"
    }
     
  13. 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"
    }
    
     
  14. strotee

    strotee MDL Member

    Jan 30, 2011
    120
    124
    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.
     
  15. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    533
    415
    30
    #835 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.
     
  16. Mavericks Choice

    Mavericks Choice MDL Expert

    Aug 5, 2015
    1,832
    7,023
    60
    Try calling the script like this it will pause & show any errors.

     
  17. zalim581

    zalim581 MDL Novice

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

    zalim581 MDL Novice

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

    zalim581 MDL Novice

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