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

#101 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 08 October 2020 - 10:17 PM

Well, folks, this is just taking our computer experience to another level!!



#102 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 09 October 2020 - 01:27 AM

btw, if one makes all deletions and then does not run a registry cleaner to fix all the fixable, then one makes alacran right, it is definitely brute force. come on, let us make it cohesive brute force, at last and at least.  



#103 wimb

wimb

    Platinum Member

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

Posted 09 October 2020 - 05:41 AM

Before Win_Reduce - 4K WIM = 4.46 GB - Compact LZX - VHD Used Size = 4.70 GB  with Windows folder = 80210 files and 19507 folders

After    Win_Reduce - 4K WIM = 2.86 GB - Compact LZX - VHD Used Size = 3.01 GB  with Windows folder = 21309 files and   2152 folders

 

Reduction  _Reduce - 4K WIM = 1.60 GB - Compact LZX - VHD Used Size = 1.69 GB  with Windows folder = 58901 files and 17355 folders

 
Before Win_Reduce == After Win_Reduce == RAMDISK   -  More Info  - 

 

 

== ==



#104 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 09 October 2020 - 06:37 AM

Well, I had fewer things than u, so the gain was about the same, even though I have gotten down to 2.3gb. BTW, even the eradication of WMP, which had to go along with that of .net, must be reckoned with. it did not take that long, though (1 min by registrar registry manager and registry1staid). Also the gain in speed must be considered.



#105 wimb

wimb

    Platinum Member

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

Posted 09 October 2020 - 06:51 AM

Well, I had fewer things than u, so the gain was about the same, even though I have gotten down to 2.3gb. BTW, even the eradication of WMP, which had to go along with that of .net, must be reckoned with. it did not take that long, though (1 min by registrar registry manager and registry1staid). Also the gain in speed must be considered.

 

30 seconds instead of 5 hours  :unsure:  ;)

 

The 2.3 GB is the size of your WIM file I assume .... ? Mine is Capture XPESS4K whereas yours is may be Capture LZX ?



#106 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 09 October 2020 - 06:56 AM

yes, correct, and the vhd used space is just 1 and a half hundred megs, so I suggest u place the half a gig option in the wimboot vhd (1gb is becoming exaggerate.



#107 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 09 October 2020 - 07:53 AM

I updated post No. 76:

 

.....

Error events: None.

 

Issues:

 

Not able to run Event viewer.

 

Fix: Use aida64, NOT free but 30 days trial: https://www.aida64.com/downloads

EDIT: Better free option: FullEventLogView Expanded: 208 KB, Download: 100 KB

 

Not able to change resolution.

 

Fix: Download MultiMonitorTool Free, extract it to a folder (I used %SystemDrive%\MultiMonitorTool) and made a shortcut on desktop to %SystemDrive%\MultiMonitorTool\MultiMonitorTool.exe /Setmax Primary

 

MS Office (32 bits) do not run.

 

Fix: Not found yet, 64 bits versions should run fine.

 

Alternatives, (to be tested): LibreOffice Portable, Apache OpenOffice Portable

 

alacran

 

@ Wonko

 

Maybe, better/smaller than AIDA :unsure: :

https://www.nirsoft....ent_viewer.html

 

:duff:

Wonko

 

Thanks tor your suggestion, it helped me to find the best free option, on mentioned page the author recommends tu use better:

 

 

Notice: On Windows 10/8/7/Vista, it's recommended to use the new FullEventLogView utility, which shows all new event logs added starting from Windows Vista.
Also, on latest releases of Windows 10, the old APIs that this tool uses stopped working properly and MyEventViewer may crash or omit some of the events.

 

Tested and working fine.

 

alacran



#108 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 09 October 2020 - 08:16 AM

Good :), 100/200 KB or so sounds better than 48 MB or so ;).

 

:duff:

Wonko 



#109 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 09 October 2020 - 10:04 AM

given the negligible sizes we have reached throughout this time, would it be preposterous to think of *.wim booting or the whole combo (wim+vhd) completely in ram, or is the same achieved by booting full vhd to ram? 



#110 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 09 October 2020 - 11:43 AM

btw, the situation is most appalling - remember my taking wmp out, both of the disk and of the registry? well, it has come back somehow, incognito, never mind appblocker, we need an anti-camouflage squad. I obviously had to divert it all to ram in the end.



#111 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 09 October 2020 - 05:10 PM

then again, the net framework software stays on disk and in registry ever after the reduction. registry shrunk by 8% my way.



#112 wimb

wimb

    Platinum Member

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

Posted 10 October 2020 - 08:22 AM

 remove_sub_Windows.txt

; Adjust to your needs - Only rules with leading backslash are used - Wildcards like * and ? are Not allowed in Folder Names
;
\Windows\Speech
\Windows\Speech_OneCore
\Windows\servicing\LCU
\Windows\Containers
\Windows\Globalization\ELS
; \Windows\Globalization\ICU  - Some Internet Pages Fail when removed
\Windows\IME \Windows\InputMethod \Windows\SoftwareDistribution
; \Windows\SystemResources - does not boot when removed

remove_sub_System32.txt

; Adjust to your needs - Only rules with leading backslash are used - Wildcards like * and ? are Not allowed in Folder Names
;
\Windows\System32\migwiz
\Windows\System32\Speech
\Windows\System32\Speech_OneCore
\Windows\System32\WinBioDatabase
\Windows\System32\WinBioPlugIns
\Windows\System32\IME
\Windows\System32\Macromed
\Windows\System32\migration
\Windows\System32\oobe
\Windows\System32\winevt

Before Win_Reduce - 4K WIM = 4.46 GB - Compact LZX - VHD Used Size = 4.70 GB  with Windows folder = 80210 files and 19507 folders

After  Win_Reduce - LZX WIM = 2.07 GB - Compact LZX - VHD Used Size = 2.80 GB  with Windows folder = 20988 files and   2102 folders

 

Reduction  _Reduce - 4K WIM = 2.39 GB - Compact LZX - VHD Used Size = 1.90 GB  with Windows folder = 59222 files and 17405 folders

 


#113 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 08:54 AM

thanx wimb



#114 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 10 October 2020 - 11:58 AM

Attached my Custom_remove_files.txt, based on our modified WimBootCompress.ini [ExclusionList] + some additions.

Useful if the installation is not captured on Wimboot mode and re applied, or to run periodically to clean accumulated garbage.

 

Edit according with your preferences.

 

NOTE: On commented lines replace YOUR-USER-NAME, and uncomment the lines.

\MSOCache\*
\Recovery\*
\$Recycle.Bin\*
; \Users\YOUR-USER-NAME\AppData\Local\IconCache.db
; \Users\YOUR-USER-NAME\AppData\Local\Microsoft\Windows\Explorer\thumbcache*.db
; \Users\YOUR-USER-NAME\NTUSER.DAT*.TM.blf
; \Users\YOUR-USER-NAME\NTUSER.DAT*.regtrans-ms
; \Users\YOUR-USER-NAME\NTUSER.DAT*.log*
\Windows\AppCompat\Programs\Amcache.hve*.TM.blf
\Windows\AppCompat\Programs\Amcache.hve*.regtrans-ms
\Windows\AppCompat\Programs\Amcache.hve*.log*
\Windows\Debug\*
\Windows\Logs\*
\Windows\Prefetch\*
\Windows\ServiceProfiles\LocalService\NTUSER.DAT*.TM.blf
\Windows\ServiceProfiles\LocalService\NTUSER.DAT*.regtrans-ms
\Windows\ServiceProfiles\LocalService\NTUSER.DAT*.log*
\Windows\ServiceProfiles\NetworkService\NTUSER.DAT*.TM.blf
\Windows\ServiceProfiles\NetworkService\NTUSER.DAT*.regtrans-ms
\Windows\ServiceProfiles\NetworkService\NTUSER.DAT*.log*
\Windows\System32\config\RegBack\*
\Windows\System32\config\*.TM.blf
\Windows\System32\config\*.regtrans-ms
\Windows\System32\config\*.log*
\Windows\System32\SMI\Store\Machine\SCHEMA.DAT*.TM.blf
\Windows\System32\SMI\Store\Machine\SCHEMA.DAT*.regtrans-ms
\Windows\System32\SMI\Store\Machine\SCHEMA.DAT*.log*
\Windows\System32\sysprep\Panther
\Windows\System32\winevt\Logs\*
\Windows\System32\winevt\TraceFormat\*
\Windows\Temp\*
\Windows\TSSysprep.log
\Windows\winsxs\poqexec.log
\Windows\winsxs\ManifestCache\*
\Windows\servicing\Sessions\*_*.xml
\Windows\servicing\Sessions\Sessions.back.xml

alacran

Attached Files



#115 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 10 October 2020 - 12:06 PM

I also delete wall papers in \Windows\Web.

Many files in \Windows\media too.



#116 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 12:09 PM

some syswow64 dll's are still needed, god knows which, the bad thing is that even if u exclude the keyboard ones, they account for almost 1gb -- grrrrrrrr!!!



#117 wimb

wimb

    Platinum Member

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

Posted 10 October 2020 - 01:41 PM

Thanks for all contributions, that will be implemented in future .....

 

In the mean time I reduced further using modified Custom_remove_folders.txt - The 2 GB  limit is in reach ....

In future version Language version will be taken into account, but for now adjust manually to keep your language in \Boot and \EFI

Some \Windows entries will be moved to remove_sub_Windows.txt

 

Spoiler

 

Before Win_Reduce - 4K WIM = 4.46 GB - Compact LZX - VHD Used Size = 4.70 GB  with Windows folder = 80210 files and 19507 folders

After  Win_Reduce - LZX WIM = 1.58 GB - Compact LZX - VHD Used Size = 2.28 GB  with Windows folder = 20463 files and   2044 folders

 

Reduction  _Reduce - 4K WIM = 2.88 GB - Compact LZX - VHD Used Size = 2.42 GB  with Windows folder = 59747 files and 17405 folders

 



#118 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 02:24 PM

Thanx wimb; btw, the return of dll's from the original put everything back to working, even w/o kbd*.dll and ...? X*.dll? And what else? Nvapi.dll and esent.dll are needed for sure.
  • wimb likes this

#119 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 03:44 PM

As an obiter dictum, I gotta be no philosopher to say that many files and folders we did succeed in taking out are in no way needed by anyone no matter what purpose. They are just there for no apparent practical intent. Is it fluff or not?

#120 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 10 October 2020 - 03:56 PM

If you haven't already done this :

I used NTLite free to get the size of the components in Win10.

- if you know where WinSAT files are : 64MB

- Hyper-V : 48MB

Attached Files



#121 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 04:13 PM

If we find ourselves at the post install stage, it mean we have done all we could in the pre-install stage, anyway I was referring only to the files and folders no one at all needs.

#122 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 10 October 2020 - 08:14 PM

JFYI

 

Did you try the idea already to make the Captured WIM file bootable ?

 

I thought this option is meant to mark a WIM file as bootable with WinPE boot.wim,

but booting directly with install.wim I think is not possible ....

 

 

In fact I did, my 2004-R.wim is loaded to Ram as any other boot.wim, but just after finish there is a message:

 

Cant find winload.exe (maybe not same words but that's the meaning).

 

As we know a boot.wim uses: \Windows\System32\Boot\winload.exe, and a OS uses \Windows\system32\winload.exe 

 

I have tried:

 

boot file: \Windows\System32\Boot\winload.exe and \Windows\system32\winload.exe

sys root: \Windows

 

I have being thinking what can be the cause of this, It is very possible it looks for it in the wrong place.

 

To start, when loaded to Ram, I don't know to what drive letter it was loaded, so next I will try:

 

boot file: \Windows\System32\Boot\winload.exe and \Windows\system32\winload.exe

sys root: X:\Windows and sys root: C:\Windows and see what happends.

 

And all possible combinations, and adding drive letters to boot file too, etc, and see what happend.

 

If there is a way to solve this, I already know next issue is going to be the possible need of a cache. But I will worry for that on the right time.

 

Well, it is 6:50 a. m. here and I haven't sleep, so I'll go to bed now, see you latter.

 

alacran

Nothig of this work.

 

Anyway if this problem could be solved, it came to my mind the registry of both is very different, and just to compare I mounted:

 

On G: is mounted Win10XPE_x64_LZX.vhd >>> Left on both pictures.

On H: is mounted 10x64-2004-LZX-R.vhd >>> Right on both pictures.
 

Registry System hives were compared side by side using Offlinereg_Gui.exe tool on offlinereg by erwan.l

 

As you can see on attached pictures differences are very significative, and this is only comparing this two sections of the registry:

 

HKEY_LOCAL_MACHINE\System\Setup\SystemSetupInProgress

SystemSetupInProgress = 1 = PE, and SystemSetupInProgress = 0 = regular windows

 

Already mentioned by Wonko on: http://reboot.pro/to...hd/#entry216310

HKEY_LOCAL_MACHINE\System\DriverDatabase

SetupStatus 259 REG_DWORD >>> on PE and >>> SetupStatus 0 REG_DWORD on regular windows

SystemRoot X:\Windows REG_SZ >>> on PE and >>> SystemRoot does not exists on regular windows

 

Being so extense the Registry it's an almost impossible task to try to make the regular windows Registry work on a PE environment.

 

I decided to stop making test and concluded that booting a regular windows WIM file (just adding bootable attribute) as PE is not possible.

 

I will update my previous post abut this subject for future readers.

 

alacran

Attached Files


  • wimb likes this

#123 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 09:25 PM

any news from the \syswow64\*.dll department? me I am taking them out few by few.



#124 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 10 October 2020 - 09:51 PM

JFYI

 

About Office 32 bits not running after using Win_Reduce_Trusted:

 

AFAIR on Min7_x-64 and Mini 8_x-64 VHDs, I was able to make Office 2003 (previously installed on source VHD) run fine on both editing the lists to keep all \Program Files (x86)\Microsoft Office and \MSOCache folders, then first time running any office program it used the MSOCache to reinstall (I assume only required portions written outside Microsoft Office folder) for the full suite, and after that all Office programs were working fine, and it was possible to delete MSOCache folder.

 

I tried a simmilar approach on 10_x64 but installing this time Office 2007 before any chopping procedure and keeping \MSOCache folder, then same same thing, but this time just after loading MSOCache it said can't load certain file (I don't remember the name right now), but looking into MSOCache folder the file is there, I assume we deleted/chopped some *.dll(s) on SysWOW64 required to load that file. By the way haven't tried with Office 2003, maybe someone can try and report his findings.

 

Testing LibreOffice Portable Fresh:

 

As an alternative I downloaded LibreOffice Portable Fresh and extracted/installed it to a partition on the HD and just ran it from the PC OS, all fine, but when tried to run it from my 10x64-2004-LZX-R.vhd (R = reduced), from same location it gave a message about \LibreOfficePortable\App\AppInfo\Launcher\LibreOfficePortable.ini can't find ProgramExecutable.

 

Quote from LibreOfficePortable.ini first section:

 

[Launch]
ProgramExecutable=libreoffice\program\soffice.exe
MinOS=7
DirectoryMoveOK=yes
SupportsUNC=yes

...........

 

But the mentioned ProgramExecutable=libreoffice\program\soffice.exe is on \LibreOfficePortable\App\libreoffice\program\soffice.exe

 

Then in conclusion LibreOffice Portable Fresh don't run fine on a Win_Reduce_Trusted environment.

 

alacran 


  • wimb likes this

#125 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 10 October 2020 - 11:38 PM

alacrán, it runs fine, and polaris office too, and other portable office suite as well. syswow64 dll's are the culprit.


  • wimb likes this



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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users