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

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    You can try to modify the condition and test it for yourself.
     
  2. fatmac

    fatmac MDL Novice

    Aug 28, 2021
    5
    0
    0
    Hello
    I've got an error while updating and creating the iso image. Full log is below. What causes this?





    Code:
    Index     : 0
    Exception : You cannot call a method on a null-valued expression.
    Category  : InvalidOperation: (:) [], RuntimeException
    ErrorID   : InvokeMethodOnNull
    Target    :
    Command   : $ISOFile = GetPath -Path $WorkFolder -Child ($($InstallInfo.Edition).Replace(' ', '') + "_$($InstallInf
                o.Build).iso")
    Script    : C:\users\b***\desktop\00\Src\Public\New-ISOMedia.ps1
    Line      : 13
    Column    : 56
    
    Index     : 1
    Exception : The property 'CodeName' cannot be found on this object. Verify that the property exists and can be set.
    Category  : InvalidOperation: (:) [], RuntimeException
    ErrorID   : PropertyNotFound
    Target    :
    Command   : Else { $ImageData.CodeName = $CurrentVersion.BuildBranch.ToUpper().Split('_')[0] }
    Script    : C:\users\b***\desktop\00\Src\Public\Get-ImageData.ps1
    Line      : 81
    Column    : 28
     
  3. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    @KedarWolf I will make now the usage script, just a minute :) Was still testing the function.

    Anyone knows, how rufus tool suppresses the privacy switches during the windows setup?
     
  4. Heero14

    Heero14 MDL Novice

    Aug 28, 2011
    19
    15
    0
    Is it normal that there are still some layout modifications being made (icons added in the Start menu like Master Control Panel, etc.) even though "LayoutModification" is set to false in Configuration.json?
     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    @gdeliana

    "SourcePath": "Select", or "SourcePath": "D:\\1\\22000.829.220706-1736.CO_RELEASE_SVC_PROD2_CLIENTMULTI_X64FRE_EN-US.ISO", not working anymore. :(

    Latest commit.
     
  6. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    #1911 gdeliana, Jul 20, 2022
    Last edited: Jul 20, 2022
    I tested with your exact path in the sourcePath, luckily i happen to have also a D: drive, and everything worked fine for me. Can you help me with any specific error with what is happening?

    Edit: Maybe now that i reverted the sourcePath key to how it used to be, it should work? Test it and let me know
     
  7. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    #1912 KedarWolf, Jul 20, 2022
    Last edited: Jul 20, 2022
    (OP)
    Source Path works now.

    Below on a 128GB USB that works on the same ISO with RUFUS.

    Edit: Probably because on an ISO bigger than 4.4GB it needs to be formatted as NTFS into two partitions, that's what RUFUS does. I integrate ALL my Windows drivers resulting in a big ISO, even with Solid compression. :(

    Code:
    Creating bootable usb.
    Format-Volume : Size Not Supported
    Activity ID: {a1e02b9a-9c51-0009-5136-e0a1519cd801}
    At D:\Optimize-Offline-master1\Optimize-Offline-master\Src\Public\FlashUSB.ps1:25 char:2
    +     Format-Volume -FileSystem FAT32
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (StorageWMI:ROOT/Microsoft/...age/MSFT_Volume) [Format-Volume], CimExcepti
       on
        + FullyQualifiedErrorId : StorageWMI 4097,Format-Volume
    
    Failed creating bootable USB
    Optimize-Offline completed in [7] minutes with [2] errors.
    Clearing temp directory...
     
  8. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    The first error is for the replace method being run on the variable $InstallInfo.Edition, it's meant to replace the space with the comma (or vice versa). However since $InstallInfo.Edition is null (inexistent) it gives the error. Why is the $InstallInfo.Edition Null?? Good question :) But this data comes from the ISO image :)

    Second error also is related to the ISO info you have provided as input.

    Please check the ISO, or try with one built from UUP-DUMP.

    Otherwise you can share with me a link of the ISO and i will test further :)
     
  9. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    Will have a look on this
     
  10. raptorddd

    raptorddd MDL Addicted

    Aug 17, 2019
    730
    276
    30
    is it ok to ask difference between this and others.? or please PM me
     
  11. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    428
    10
    @KedarWolf I have made the ability to flash install.wim larger than 4GB by using the swm splitting method. Unfortunately i cannot use NTFS because i will get a non bootable usb. There are many bioses out there which cannot boot in NTFS. Regarding rufus, it uses some special UEFI partition for that. For now i haven't figured out yet how to do that. The size of the FAT32 partition will be the size of the ISO + ~25MB offset.
    If you could test the swm splitting if it works as intended that would be great.
     
  12. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,396
    2,376
    60
    Could @freddie-o's Win10+ Setup Disk Script hold a possible solution to the problem ?
     
  13. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    874
    30
    USB option works now, but only if the USB is formatted GPT, if it's MBR it fails (my backup software uses MBR by default).