|RUS:||Уменьшение размера папки Winsxs в Windows 7 или как пользоваться WinsxsLite.bat|
1) Described procedure is very dangerous to OS, therefore before its application it is necessary to make a snapshot of a disk or partition by means of Acronis True Image or the similar program.
2) Procedure is executed the longtime — therefore plan time.
3) Procedure cannot process files blocked by any processes. Moreover, if procedure cannot process normally the blocked files, the risk sharply increases that then something does not work or the system will be spoiled. Therefore on procedure runtime, it is necessary to close all executable applications and to stop all possible services. But it is even better to execute procedure in «Save Mode» (F8) since in this case much less files it is blocked by system.
Well here again faced shortage of a place on disk C:on a house computer.
The Analysis by means of the program FolderSizes showed that most of all places on a disk are occupied with a folder C:Windows, and in it a folder winsxs.
Started to investigate a problem from reading of articles. Here, for example, from one of developers Windows
Very interesting article (truth it for Vista, at me 7)
By the way, is also official article of Microsoft on this problem — How to Alleviate Disk Space Pressure Caused By a Large Windows Component Store (WinSxS) Directory — but recommendations which there are given standard and hardly help to decrease a place.
It appears that the folder winsxs is main storage of system files on which hard-links become. The mechanism of operation with this storage is far from an ideal (IMHO). But certain guy Christian Bering Boegh wrote bat-file WinsxsLite.bat which relink links to file most current release, and deletes all remaining versions as relinked and deleted files of unnecessary languages.
This Christian simply monster in a writing bat-files, such creates not everyone can …
In Help.htm at it it is written that bat-file makes irreversible changes i.e. if that goes not so the system will be spoiled also clear business better beforehand to snapshot of a disk.
So, vsp1cln.exe and compcln.exe I do not do, because at me Windows 7, but they like as are intended for Windows Vista.
Since I downloaded bat-file with a set of all necessary utilities and Config.txt already was like as is correctly adjusted, it is necessary to launch bat-file simply. If Config.txt is not present, it is possible to launch bat-file simply and to select [q], Config.txt it will be generated.
I decided to do on algorithm
Phase 1 scan
Phase 1 apply
Phase 2 scan
Phase 2 apply
To begin with I determine the size of a folder winsxs (through an explorer) is for control.
the Size: 4,16 Gb
The size on a disk: 4,22 Gb
Generally the author bat-file states that the size of a folder winsxs in an explorer is determined incorrectly. Determine during experiment therefore the size by means of it bat-file (the menu [w]).
1) I Download bat-file. (If there already is not present it is possible to search on WinsxsLite.bat).
2) (Picture 1 ). I launch bat-file WinsxsLite.bat . At start files multimedia files of examples are searched and is formed bat-file for their deleting DelWinsxsSampleMedia.bat (I execute it is it releases 30Мб for me). After that I look the size of a folder winsxs — [w]. (Determination of the size as can be longtime, on my old notebook, approximately minutes 15 went).
3) (Picture 2). Further I select  and [s] (scan), there is a long scanning (at me the order of 1 hour). The file ToDo1.txt with results of scanning is as a result formed. After that once again I select , but now the menu to become more variously and I select [a] (applay). Again there is a process (here already faster minutes 15-20) .
4) (Picture 3). After execution of the first phase — 18 pending hardlink. Doing the first time, selected from the menu [A]uto start which did not fulfill on Windows 7. Doing the second time fulfilled Re[s]hchedule activation is WORKS, i.e. all links have been relinked.
5) (Picture 4). I check the size. I so understand that it is necessary to be guided on free space. It was 15064 MB — was 15829 MB = 765 MB was released.
6) Reboot. I think that in it there is no necessity, but just in case …
7) (Picture 5). I launch WinsxsLite.bat and I select  and [s]. There is a scanning process (much faster than in the first phase, minutes 10-15). During scanning the file ToDo2.txt is formed. After scanning I select  and [a]. There is an application process. In a picture 5 the message is visible that the file ToDo2.txt became outdated. For this reason in the documentation to be told that is better scanning and application to do in at one time differently if to do scan, and then in some days to apply results ToDo*.txt, its contents can become irrelevant and the system can be spoiled.
9) I Launch WinsxsLite.bat. the Program speaks to me that OS has not been rebooted and reboot (from what it is required?). Well all right I reboot once again.
10) I Launch WinsxsLite.bat. the program speaks that it is necessary to process pending hardlink and suggests to make either Auto start or Exit. I do [A]uto start. I reboot.
11) I Launch WinsxsLite.bat . Works autostart, something does.
I Look the sizes (Picture 6). 16278-15064 = 1214 MB. The whole gigabyte was released.
It is possible to make still [R]elocate folders — allows to move system folders on other disk. I suppose this point it is necessary to use only in case of extreme need. I did not do it.
And by the way on an explorer it turns out that places was released very little and for some reason a difference in 12 files … (Explorer really incorrectly shows the size of a folder winsxs).
the Size: 4,14 Gb
The size on a disk: 4,20 Gb
Impression about bat-file in general positive, except a few tangled interface and the process and still is very longtime. Here if to rewrite all it under C# with a multithreading, I think would began to work faster.
Запись Decrease of the size of folder Winsxs in Windows 7 or how to use WinsxsLite.bat впервые появилась Dmitry Bobrovsky Blog