Reducing windows size below 4GB installed size.

Discussion in 'Windows 11' started by everonetho3, Feb 17, 2023.

  1. everonetho3

    everonetho3 MDL Novice

    Jan 7, 2023
    3
    0
    0
    Hi!

    I recently noticed W11 mod with installed size below 4GB
    And I want to ask if anybody have idea what "tricks" he (creator of mod) used to achieve that?

    My best was ~8GB of disk drive, and I want to go lower because I have mini-pc with 16gb soldered storage

    All I know, he used some form of compression but compact.exe says otherwise

    Here are the screenshots to help you:
    imgur(dot)com/a/m5OkT7z

    Thanks for any help.
     
  2. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,027
    93,873
    450
  3. verndog

    verndog MDL Member

    May 3, 2010
    210
    93
    10
    "And I want to ask if anybody have idea what "tricks" he (creator of mod) used to achieve that?"
    You need to ask how did the updates go after that achievement.
     
  4. everonetho3

    everonetho3 MDL Novice

    Jan 7, 2023
    3
    0
    0
    Updates in my case are not as much important.

    But that <4gb installed size is more interesting to me.
    Although size is ~7gb but allocates half of it making it ~3,5 gig on hdd/ssd
     
  5. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    863
    348
    30
    Compare file lists with BCompare.

    The lowest I have achieve is 2.70 GB. Then I decided to keep a few more things, some UWP apps, integrate .Net 3.5 and final size was 3.40 GB But I did not use any kinda compression, I don't like compression.

    If you can PM me the link to the build, I'll check it out how they did it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,172
    1,052
    60
    LZX compression is manual, future files are not compressed. I got the ratio 2 to 1.
    Code:
    compact /c /i /q /f /exe:lzx /s:C:\Windows
     

    Attached Files:

  7. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    3,645
    2,620
    120
    I don't suggest to do that.

    Unlike the old NTFS compression, the new compression doesn't stick after a file is modified/added, so it grows unnecessarily during the daily usage.

    Way better.

    First compress with the good old NTFS compression (the blue files), which has relatively poor compress ratio (1.3-1.6 on average) but inherits the compressed status, and has almost no impact on a modern CPU usage.

    Then capture the image of the OS using wimlib, then format and restore the image using wimlib with the compact=lzx flag.


    This way everything will be LZX compressed, but added/modified files will retain the NTFS compressed flag so your install grows way less during the normal usage and monthly updates.
     
  8. berr1sfueller

    berr1sfueller MDL Senior Member

    Nov 17, 2022
    413
    450
    10
    Apply the image with the /compact option: DISM /Apply-Image /ImageFile:install.wim /Index:1 /ApplyDir:Z:\ /compact
    Disabled=8.8GB used space
    Enabled=5.6GB used space
    Works well and will be adding as a menu-option (+compact VHDX) in the next update.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    3,645
    2,620
    120

    Obviously this works as well, but wimlib works also on linux, macos and other unixes. and it's also faster with better compression, and more options.

    wimlib-imagex.exe apply X:\whatever.wim 1 Z:\ --compact=LZX would be the equivalent command
     
  10. everonetho3

    everonetho3 MDL Novice

    Jan 7, 2023
    3
    0
    0
    Thank you for all suggestions. I will try out all of them in future.

    Thanks once again.
     
  11. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,027
    93,873
    450
  12. Atari800XL

    Atari800XL MDL Addicted

    Apr 3, 2011
    954
    1,673
    30
    Now say it like you mean it :)
     
  13. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    2,304
    1,534
    90
    or use windows 10 ltsc... 2021 to have lite version. .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...