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

    drew84 MDL Addicted

    Mar 13, 2014
    881
    1,345
    30
  2. mR0463

    mR0463 MDL Novice

    Feb 1, 2021
    5
    0
    0
    Thanks for the info - this does not seem to be the problem as sysprep itself runs fine (but takes forever). Once sysprep is done and I reboot into installation/OOBE, the installation gets stuck before OOBE. The problem only appears when I run Set-Additional.ps1 while in Audit mode (I am on build 19042 by the way). Without it, sysprep finishes much faster as well.
    I'll probably just use Set-Additional after deployment, should not be too much of a problem.
     
  3. rentay

    rentay MDL Novice

    Dec 30, 2013
    27
    7
    0
    Any updates on when the gui version will be released?
    Hope everything is ok with the dev
     
  4. phazer11

    phazer11 MDL Novice

    Jan 20, 2017
    20
    3
    0
    Quick question. New to NVMEs and I've always avoided unattend.xmls as I'm a bit spooked it'll overwrite one of my data drives. I have not installed the NVME drive into my motherboard yet but there is only one NVME slot. Is there any way of knowing if NVME drives take the lowest drive letter by default? I ask because it takes an act of congress to remove my SATA connectors from my motherboard. Which is why I always do manual install so I can select the right one. If anyone can maybe point me somewhere that'd be great.
     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    As long as you haven't changed the drive letters in Windows, in the Windows search box type diskpart, run it as Admin, and use the command below.

    Code:
    list volume
     
  6. phazer11

    phazer11 MDL Novice

    Jan 20, 2017
    20
    3
    0
  7. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    If you install Windows and use a custom install, it should let you choose the disk you want to use. The unattend.xml only picks the disk for you if you don't choose custom install.
     
  8. phazer11

    phazer11 MDL Novice

    Jan 20, 2017
    20
    3
    0
    Yeah that's why I never use an unattend just slog through the install. Though looks like the unattend wizard linked in the guide only lets you go up to disk 5. I'll try and edit it and see what happens. That second command you wrote for diskpart gave the same answer as Disk Management so it's pulling it from the same place it looks like.
     
  9. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    I use an unattend.xml but just manually select my disk, all the other unattend stuff works fine.

    Edit: I have a post with my completed unattend.xml here in this thread. It's set up for en-GB and en-CA locale though, you'd need to change that likely. And my username and Windows key are commented out and stuff.

    Search is your friend. :)
     
  10. phazer11

    phazer11 MDL Novice

    Jan 20, 2017
    20
    3
    0
    Oh so what do you remove just the lines pertaining to the disk? Like.
    Code:
    <DiskConfiguration>
    <Disk wcm:action="add">
    <DiskID>0</DiskID>
    <WillWipeDisk>false</WillWipeDisk>
    <CreatePartitions>
    <!-- Windows RE Tools partition -->
    <CreatePartition wcm:action="add">
    <Order>1</Order>
    <Type>Primary</Type>
    <Size>300</Size>
    </CreatePartition>
    <!-- System partition (ESP) -->
    <CreatePartition wcm:action="add">
    <Order>2</Order>
    <Type>EFI</Type>
    <Size>100</Size>
    </CreatePartition>
    <!-- Microsoft reserved partition (MSR) -->
    <CreatePartition wcm:action="add">
    <Order>3</Order>
    <Type>MSR</Type>
    <Size>128</Size>
    </CreatePartition>
    <!-- Windows partition -->
    <CreatePartition wcm:action="add">
    <Order>4</Order>
    <Type>Primary</Type>
    <Extend>true</Extend>
    </CreatePartition>
    </CreatePartitions>
    <ModifyPartitions>
    <!-- Windows RE Tools partition -->
    <ModifyPartition wcm:action="add">
    <Order>1</Order>
    <PartitionID>1</PartitionID>
    <Label>WINRE</Label>
    <Format>NTFS</Format>
    <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
    </ModifyPartition>
    <!-- System partition (ESP) -->
    <ModifyPartition wcm:action="add">
    <Order>2</Order>
    <PartitionID>2</PartitionID>
    <Label>System</Label>
    <Format>FAT32</Format>
    </ModifyPartition>
    <!-- MSR partition does not need to be modified -->
    <ModifyPartition wcm:action="add">
    <Order>3</Order>
    <PartitionID>3</PartitionID>
    </ModifyPartition>
    <!-- Windows partition -->
    <ModifyPartition wcm:action="add">
    <Order>4</Order>
    <PartitionID>4</PartitionID>
    <Label>OS</Label>
    <Letter>C</Letter>
    <Format>NTFS</Format>
    </ModifyPartition>
    </ModifyPartitions>
    </Disk>
    </DiskConfiguration>
    <ImageInstall>
    <OSImage>
    <InstallTo>
    <DiskID>5</DiskID>
    <PartitionID>4</PartitionID>
    </InstallTo>
    <InstallToAvailablePartition>false</InstallToAvailablePartition>
     
  11. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    Install ADK, run Windows System Manager from Start Menu Windows Kits and remove all the disk partitioning options. Then save it.

    Have a backup Windows install USB, any error in your unattend file and Windows will error out and not install.

    Edit: You need to extract a Windows ISO with WinRar and browse to the install.wim in the sources folder.
     
  12. phazer11

    phazer11 MDL Novice

    Jan 20, 2017
    20
    3
    0
    Thanks @KedarWolf
    Had to take a break from working on this as my mother broke her leg. I've worked on the bit you mentioned and integrated updates with W10UI as I have in the past however I guess one of my updates changed the build number to 19042 and now Update Offline won't pass the edition selection screen (these are all mainline updates as far as I could tell not preview). Is there a way to bypass the image version check so I can try and build the image?
     
  13. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    513
    398
    30
    I think if you replace all of the code with $InstallInfo.Build -le '19041' with $InstallInfo.Build -ge '19041' it fixes it if I recall right.

    Easiest way is to use Notepad++.