Jump to content











Photo
- - - - -

Reducing OS footprint

wimlib-imagex wimlib-clc winsxs_reduce reduce os footprint

  • Please log in to reply
444 replies to this topic

#1 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 October 2020 - 08:02 PM

I started this new topic to keep together different tools and procedures available to reduce the used size of the OS.

 

I had the idea when making post: http://reboot.pro/to...-14#entry216443

 

Spoiler

 

I will update latter this topic with a compilation of info, spread on several topics on the forum.

This topic was created with the idea to share your test made, and the results of them (good or bad), but please it is required:

  • Detailed procedures.
  • Clear info.
  • Advantages and disadvantages (if any).
  • Possible issues (if any) and how to fix them.
  • Pictures.
  • Links of tools used.

 

EDIT: During the tests ran for this topic we have achieved a 1.57 GB used size on a 2.3 GB VHD, by means of cutting several non critical parts on the 10 OS.

 

Our fellow wimb making use of his skills on AutoIt3, was able to put together all the info we have gotten on this topic, about cuttings and related to some programs, and also about some free portables, and made a program capable to do all this automatically in less than a minute.

  • Win_Reduce_Trusted v4.0 (valid for 10, 8.1 and 7) links are on post No. 429,
  • Install and run Office 2003, info on Post No. 179
  • Additional info for Win_Reduce_Trusted is on post No. 339.
  • Additional files required to keep to run LibreOfficePortable (multilang) are on Post No. 340.
  • Interesting info when using NTFS Compression + Compact LZX compression on Post No. 341.
  • Additional info about LibreOfficePortable on this Post
  • New info from wimb about LibreOfficePortable on Post No. 429
  • Additional useful links for your Mini-10x64-2004.vhd on this Post and this Post.
  • What to do in case you find some issues with your favorite programs, see Post No. 376
  • Remote image capture and deploy by means of Mini10x64.vhd and TeamViewerPortable, see post No. 430

 

alacran


  • wimb and Tokener like this

#2 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 October 2020 - 09:08 PM

Reduce the install.wim file Index(es)

 

I usually use MSMG ToolKit a free tool to remove safely from the install.wim index(es) all things I don't like/use on my installed OS, also some redistributables as DirecX, .Net Framework, VCC++, etc., can be added with this tool, just read carefully the included README.txt, to start running it just run as Admin the Start.cmd, this tool is basically a long script (1.50 MB +) that let you select the ISO, and extracts folder sources content to its ToolKit_vxx.x\ISO\sources folder, then you can select the Index(es) where you want to make the changes, boot.wim and recovery.wim can also be selected, then the WIM(s) are mounted using Dism to its ToolKit_vxx.x\Temp folder, and all removed or added is made by Dism, see attached picture of Main Menu.

 

As the subject of this topic is related to reduce the size of the OS, I will talk only about the options related to this matter, following is a compilation I made (from the Toolkit.cmd) of the windows presented to the user, when selecting the available options related to remove, deactivate certain options or characteristics, I included only those related to 10 v2004 to make this shorter but the script can be used from 7 to 10 and it is coded with the options that apply for each version.

 

Spoiler

 

alacran

Attached Files



#3 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 October 2020 - 09:42 PM

Multi-OEM/Retail Project {MRP} - Mk3

 

You need to be or become a member to open the link.

 

This tool DO NOT contain any cracks, malware or telemetry into it, and is very usefull to create a $OEM$ folder that will be used during installation to make a tailored installation according with our preferences, adding certain usefull items and/or removing/unactivating certain unwanted characteristics, and it is also usefull to highly reduce the OS telemetry, for more info take a look to the attached pictures of my usual settings.


 

This program works from 7 to 10, x86 and x64, under Bios or UEFI environments.

 

alacran

Attached Files

  • Attached File  1.png   94.09KB   2 downloads
  • Attached File  2.png   84.71KB   1 downloads
  • Attached File  3.png   80.25KB   1 downloads
  • Attached File  4.png   79.31KB   1 downloads
  • Attached File  5.png   95.8KB   1 downloads
  • Attached File  6.png   80.09KB   1 downloads
  • Attached File  7.png   81.82KB   1 downloads

  • wimb likes this

#4 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 October 2020 - 11:18 PM

Reduce the OS after installed.

 

In the quote of first Post there is a comment about WinSxS_Reduce_Trusted this is a tool made by wimb based on cdob commands, what it does is reduce the content of Windows\WinSxS folder, during some test ran on 10x64 Compact LZX installed and using cdob commands got a reduction of about 0.85 GB of used size by the OS, (only valid for 10).

 

From: http://reboot.pro/to...ls/#entry215543

 

Comparing LZX and LZX Reduced there is a saving of 0.85 GB, lets say almost 1 GB

 

I also mentioned the OS can also be reduced if we edit the WimBootCompress.ini [ExclusionList], but this requires to capture and reinstall it, this apply from 7 to 10.

 

In fact our current modified WimBootCompress.ini [ExclusionList] section already contains this two lines to reduce the used size comsumed.

 

[ExclusionList]
\MSOCache\* >>>  This is from MS Office installation, usually from 250 MB to about 1 Gb depending of the program version.
\Recovery\*  >>>  This is 165 MB on 7 and about 420 MB on 10.

 

So far all reductions/deletions are safe and do not remove any critical characteristic of the OSs.

 

Of course there may be other files/folders that could be added to WimBootCompress.ini [ExclusionList] but as also said on the quote on first Post:

 

Then any files/folders added by the user to [ExclusionList] section will not be included on the new WIM file (no matter the consequences), edit it wisely to avoid future troubles after apply the new WIM on a new installation.

 

In fact it is as a chopping by brute force.

 

I invite all readers of this topic to share their experiences when chopping the OS.

 

alacran


  • wimb likes this

#5 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 05:04 AM

After using WinSxS_Reduce_Trusted,

 

I did some brute force chopping in Win10XPE on mounted Win10x64 VHD and removed folders SysWOW64 and Microsoft.NET and 

 

the NVIDIA DriverStore folder \Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_90685a092bcf58c7

 

After Chopping then Win10x64 is still booting fine, but we don't have support for 32-bits and .NET apps anymore.

 

Attached File  Chopped_2020-10-04_065558.jpg   347.8KB   0 downloads == Attached File  Chopped_sshot-1.png   547.45KB   0 downloads


  • alacran likes this

#6 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 October 2020 - 05:28 AM

Good test.

 

EDIT: But from your pictures the gain in saved espace is only 0.46 GB, so it isn't a big gain, I should expect bigger gain.

 

Was the VHD Compact LZX?

 

And I assume now you will have a lot of Error events on the Event viewer >>> Windows logs (maybe other words, mine is in spanish Registros de Windows) on Application, Safety, Installation and System sections.  Please would you check this?

 

By the way I have some time trying to stop so many reports and logs mainly saying something is working fine, and I would like to have and keep info only when something is not working fine.

 

From a link on a Wonko's post: http://reboot.pro/to...13#entry216280 on this link: https://superuser.co...s-10-system-log

 

I tried the suggested command: auditpol /set /subcategory:"Filtering Platform Connection" /success:disable /failure:enable, but it is not acepted the message said only one command by execution is allow.

 

alacran



#7 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 06:21 AM

Good test.

 

EDIT: But from your pictures the gain in saved espace is only 0.46 GB, so it isn't a big gain, I should expect bigger gain.

 

Was the VHD Compact LZX?

 

 

The comparison is a good illustration but not really valid to make conclusion about saved space.

The comparison is between different VHD's where the same WIM file was applied but with different history ....

The left panel is the Chopped Win10x64 and includes New Edge, whereas the right panel is reduced with WinSxS_Reduce_Trusted only and where New Edge was Not Installed.

 

Strange thing is that 64-bits New Edge is Installed in C:\Program Files (x86)\Microsoft and can be used when SysWOW64 folder has been removed !!!!  :w00t:

 

Chopped_2020-10-04_065558.jpg == Chopped_sshot-1.png
 

The change in System32 and SysWOW64 and Microsoft.NET folders is evident ....

It is indeed Compact LZX Applied by VHD_WIMBOOT

 

I need to view the Error events logs, but until now everything for 64-bits apps is working fine



#8 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 07:19 AM

And I assume now you will have a lot of Error events on the Event viewer >>> Windows logs (maybe other words, mine is in spanish Registros de Windows) on Application, Safety, Installation and System sections.  Please would you check this?

 

There are no Event viewer > Windows logs available in my Chopped / Reduced Win10x64 VHD  :(

 

As you can see 64-bits Edge is Installed in C:\Program Files (x86)\Microsoft\Edge\Application

 

Attached File  Edge_sshot-1.png   143.49KB   0 downloads



#9 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 04 October 2020 - 07:54 AM

brute force is the most effective!!! jokes apart, can u have .net and 32bit apps working without syswow64 now?



#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 October 2020 - 10:11 AM

syswow64, as the name implies (in the perverted minds of the good MS guys) is actually the 32 bit sub-system on 64 bit OSes:

https://www.samlogic...86-syswow64.htm

so allow me to doubt that 32 bit apps will work without syswow64.

 

:duff:

Wonko



#11 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 12:41 PM

 

EDIT: But from your pictures the gain in saved espace is only 0.46 GB, so it isn't a big gain, I should expect bigger gain.

 

Was the VHD Compact LZX?

 

 

 

I repeated the experiment VHD with Compact LZX fresh Win10x64 2004 + Office2003 Integrated until 2014 + 7-zip + VLC Player + registrybackup - UsedSize = 5.27 GB

 

After WinSxS_Reduce_Trusted then UsedSize = 4.58 GB and the Reduction Effect = 0.69 GB

 

After Chopping SysWOW64 and Microsoft.NET and NVIDIA DriverStore folders then UsedSize = 3.70 GB and the Reduction Effect = 0.88 GB

 

Compact LZX  == WinSxS_Reduce == Chopped SysWOW64 and .NET and NVIDIA == Mount VHD in other W10x64 == and Mounted in 10XPE == Chopped assembly

 

Attached File  Chop_0_2020-10-04_140318.jpg   345.55KB   0 downloads == Attached File  Chop_1_2020-10-04_140547.jpg   346.51KB   0 downloads == Attached File  Chop_2_2020-10-04_141051.jpg   344.57KB   0 downloads == Attached File  Chop_3_2020-10-04_152316.jpg   147.14KB   0 downloads == Attached File  Chop_4_2020-10-04_154302.jpg   346.99KB   0 downloads == Attached File  Chop_5_2020-10-04_164538.jpg   344.29KB   0 downloads

 

New Edge is Not Installed !!

 

- After WinSxS_Reduce_Trusted and Chopping SysWOW64 and Microsoft.NET and NVIDIA DriverStore folders then still booting FINE  :)

 

EDIT: After Booting VHD followed by Mounting VHD in Other Win10x64 there is remarkable change in System32 and in Program Files and in ProgramData folders  :rolleyes:

 

What is Next to be Chopped Or are we Finished ...? No, we can chop assembly folder (part of .NET) gives UsedSize = 3.54 GB and Reduction Effect = 0.16 GB



#12 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 04 October 2020 - 03:01 PM

What would stop working with this latest chopping of yours? 



#13 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 04:46 PM

What would stop working with this latest chopping of yours?

 

.NET Apps ....



#14 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 October 2020 - 06:03 PM

If you chop SysWOW64, Office version installed has to be x64 or it will not work, also PS.exe, Pstart.exe, aida64.exe and a big etc. will not work.

 

I suggest to not chop it and better reduce SysWOW64 as on Win10XPE_x64 (size 174 MB), attached the list file used: WoW64_AddFiles.

 

EDIT: The minimum files we need to keep are those allready on the wimre.wim + all added by the attached list.

 

About chop Microsoft.NET, a lot of .Net files still remain on other locations see attached picture, but they should be easily deteted searching for .NET on SwiftSearch, selecting all of them and right click delete.

 

alacran

Attached Files


  • wimb likes this

#15 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 06:45 PM

If you chop SysWOW64, Office version installed has to be x64 or it will not work, also PS.exe, Pstart.exe, aida64.exe and a big etc. will not work.

 

I suggest to not chop it and better reduce SysWOW64 as on Win10XPE_x64 (size 174 MB), attached the list file used: WoW64_AddFiles.

 

This are the minimum files we need to keep.

 

About chop Microsoft.NET, a lot of .Net files still remain on other locations see attached picture, but they should be easily deteted searching for .NET on SwiftSearch, selecting all of them and right click delete.

 

alacran

 

Good idea and Thanks for the minimal SysWOW64 filelist  :)

 

More and more it sounds like the approach of Mini 7 and Mini 8,

where the filelist of PE was used as minimal needed files combined with the full registry of installed 7 / 8

 

Hello World - Mini 10 is coming .... 

 

but still not really needed since we have WimBoot for booting from RAMDISK with UsedSize 200-600 MB

and for FILEDISK a few extra GB is No problem nowadays .... Nevertheless we try what can be realised with chopping  :)

Actually I am surprised that Win10x64 allows so easily all this chopping ....

 

Interesting could be that we end with small VHD booting from RAMDISK without being connected to the large WIM file

and that we can modify that VHD by booting as FILEDISK e.g. for Install of small program, which is not possible in PE.

 

I think it can work ....



#16 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 October 2020 - 07:28 PM

JFYI

 

After apply WinSxS_Reduce_Trusted, and remove SysWOW64 and Microsoft.NET by brute force, made last night.

 

The Windows Event viewer do not work, but if going to %WinDir%\System32\\winevt\Logs we can see all *.evtx files are there.

 

I copied from my mounted Win10XPE_x64_LZX.vhd the SysWOW64 folder and now 32 bits programs are running fine.

 

And also deleted:

 

About chop Microsoft.NET, a lot of .Net files still remain on other locations see attached picture, but they should be easily deteted searching for .NET on SwiftSearch, selecting all of them and right click delete.

 

I got two messeges when booting, sorry i wasn't able to capture the screen, but as now 32 bits programs are running fine I was able to run aida64.exe portable to take a look to the Events.

 

EDIT: Before deleting the remaining .NET files it was booting fine, no messages so I think it is better not do this. The info for the Errors was not helpful, just vague info or nothing, but I think it is related to the 2 messages when booting and also the Event viewer not working when running it.

 

alacran

Attached Files


  • wimb likes this

#17 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 07:36 PM

After chop System32\WinBio folders and C:\Windows\System32\DriverStore\FileRepository\helloface.inf_amd64_5fda9eda33bf7e67 and all Asian Fonts

 

Attached File  Chop_6_2020-10-04_213111.jpg   148.73KB   0 downloads

 

What's next. Until now no problem with chopping ....

 

Nice to hear that 32-bit apps are working with Reduced SysWOW64  :)



#18 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 October 2020 - 07:46 PM

Maybe all *.mui files not in your language.

 

alacran



#19 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 October 2020 - 08:09 PM

After checking Windows\System32 I found all non es_MX or es_ES (in my case), are only about 48 MB, so it will not be a big gain, but anyway I never use them.

 

alacran



#20 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 October 2020 - 08:15 PM

In general we can try to reduce System32 to a level more corresponding to 10XPE ....

 

Removal of System32\Speech can be tried as well, and System32\migwiz

 

Also we can compare with Portable / Mini 8 FileLists in folder VHD_W8C_88\VHD_W8 ( copy_8vhd.txt and mini_8vhd.txt etc)



#21 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 October 2020 - 08:41 PM

Yes, in fact was typing when I noticed your new post.

My suggestions to remove:

Windows\Speech_OneCore folder 48.2 MB
Windows\System32\Speech_OneCore folder 12.1 MB

And this 2 but I don't know the location:

Windows Subsystem For Linux
Windows Mixed Reality

alacran



#22 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 05 October 2020 - 10:11 AM

How about syswow64 subfolders? do they go away or are they kept?



#23 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 05 October 2020 - 01:48 PM

have u really tested what u are advocating? I have, and either it does not work or I am a total fool.



#24 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 05 October 2020 - 01:55 PM

... either it does not work or I am a total fool.

tertium non datur ...

 

https://en.wikipedia...excluded_middle

 

according to Quelo :

https://it.wikipedia...a_che_hai_detto!

 

:duff:

Wonko


  • antonino61 likes this

#25 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 05 October 2020 - 01:59 PM

hhahha, wonko, albeit in ur own way, u r wonderful. I really did try hard in testing it, left, right and center, I really do not know whether I shoulda run it all as ti but i did as admin, honestly. is this the tertium datur, or did they go by analogy with mini8 or winpe? I am desperate for something that could support my chopping, which is of the "do everything but fix the mislinks" type, at least, to the best of my knowledge (which is slight) and belief (which is huge).

 

@everyone of good intellect&understanding

i guess healthy competition for the smallest os, which, believe me, is useful, and not only a curiosity, must be gauged on the wim, not on the vhd. I have the smallest 19041/2 264 build combo (vhd+wim) below 3gb put together (of course vhd.gz 15megs). all this was done with my chopping sequence, which could be coupled with any further and wider chopping. of course. I am now trying an older version. I can easily keep my chopping under control, even though it was decided against, but no prob, i will let u know. the only problem is time.





Also tagged with one or more of these keywords: wimlib-imagex, wimlib-clc, winsxs_reduce, reduce os footprint

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users