WinSxS folder in Windows 10 explained

What would you like to read next?

37 Comments

  1. Good Article. I was fixing to use “mklink /J “c:Windowswinsxs” “d:winsxs”
    to save room on my ssd as my winsxs folder shows itself to be 9.39 Gigabytes. After reading this i decided i better buy a Larger SSD. Thanks

  2. Getting a larger SSD isn’t an option, when running Windows inside Oracle VM VirtualBox for example.

  3. I’d kill for a 4GB SXS folder, mine is ridiculous @ > 20GB. Killing the smaller drive that I have for my OS install.

  4. microsoft sucks. for me that folder takes 12 GB!!! And as I have SSD there are no more space at all in it. Microsoft must die!!!

  5. “Let the WinSxS folder be as it is” I cannot agree with this statement. The winsxs folder is something that should go and the sooner that happens the better and easier it will be. It is the result of a decision that microsoft made back with windows 3.0 and while everything including processor scheduling has moved on since then the situation known as DLL hell has only received a patch job and winsxs was born.

    Even looking at your example of rundll I can only find two versions, x86 and amd64, so it doesn’t seem that important in any case. The root of the problem is really microsoft’s visual studio compilers and redistributable dll’s. In the 1990’s memory was scarce and dynamic linking was much preferred to static lib linking. Each application would rather than incorporating library code into the executable link to it at runtime so only one copy is present in memory. But updating shared components often results in previously working programs suddenly no longer working. Ms’s solution to the problem was for the program to specify a compatible version of a DLL and load that thus creating the “side-by-side assemblies.”

    It did solve one problem, in a way, but introduced numerous others. First off the memory saving of shared components has been unrealised with multiple versions present. And let’s face it, we have much more memory today so we can afford to use static linking instead as many other vendors tried to force. Also if one version of a DLL is patched it still leaves others behind that could be a security risk so it may be a detriment to security.

    The correct approach here is to go with the other solution to DDL hell, namely let executables in a single product share the same DLL’s. Dependencies should in any case be stored with the application and not in system folders or the registry.

  6. Just only about 2 month ago I started with Win7 Pro and that was not voluntarily. I like my new hardware, but the difference between XP and Win7 is a terrible and time consuming issue.
    Of course, since then I have also searched for and read a lot about the winsxs storage monster. And although there is already written so much about this subject, I like to add something to that.

    One of my hobbyhorses is image backups. I can’t remember how long I use already that type of backup for the system drive. However, it is remarkable that I see that advice very occasionally in all the information and discussions at the internet. In case of a Windows or system drive (fatal) malfunction, it is IMHO the only easy, fast and reliable way of recovery. And in less catastrophic situations, restoring an image backup is still the most reliable method for a ‘roll back’.
    So, don’t rely on the Windows Recovery options (I never did) and make image backups. And uninstalling updates I never do too. If there would be a reason for ‘roll back’, I use the reliable way.
    Therefore I have some requests or suggestions:
    To system builders: split up drives in more partitions.
    To software developers: offer always the option for installing at a custom location.
    To Microsoft developers: make the default location for e.g. personal data NOT at the system drive. It is not only storage, but they are lost by restoring if you forget to copy them before.
    Note. All the other suggestions, remarks and complaints would be too much to write here. 🙂

    Back to storage and winsxs. It is true that HDD storage is cheap and SSD storage not very expensive anymore. So, for new desktop systems the storage costs don’t count (much), but for older hardware and/or notebooks or tablets it can still be a major issue. But winsxs (and DriverStore) has a considerable effect on the size of the (full) image backup. And there are other (performance) drawbacks, e.g. the time needed for searching the system drive, mounting an image backup or scanning the drive with WinDirStat.
    For me, the main reason of annoyance is that the MS developers probably think that they are covering nearly all system problems by storing a lot of old versions and duplicates in that winsxs folder. Well, IMHO it is the wrong way and at the wrong location. It is rather ironically and frustrating that if you use the safe backup procedure, a lot of that data is superfluous and is increasing the backup data that is stored (cheap) elsewhere!
    Note. I store backups at a partition of the local HDD and copy that data regularly to an external drive.

    An example of the MS stupidity. Mainly for curiosity reasons, I installed some additional system languages (using Win7 Ultimate trial). Such updates install a lot of data and when I tested afterwards the uninstalling, I found that most of that huge increase of data was left behind in the winsxs folder. That conclusion is based on the results of WinDirStat and the sizes of image backups. My description of that residue is ‘superfluous rubbish’.
    So, I don’t think that uninstalling old/unused software will cleanup that messy winsxs folder.
    Unfortunately, it’s nearly impossible for a user to delete some of that garbage in an easy and safe way. I don’t know yet if e.g. the winsxsBackup folder really contains old data that is not used anymore.

    And then the argument that it is necessary to keep all the old versions of DLL’s there. I think that it is very likely that most (decent) software is working properly with the newer versions too.
    Well, to discuss is the question if every user should be bothered with a lot of unused data because some users are (maybe occasionally) using a program that needs an old specific DLL version. In that case it would be better that the software developer has made his own DLL (version) and install that at the program location. Btw, much software is still doing that.
    Note. I don’t understand that if a system DLL is changed significantly, the name is not changed too.

    Another disputable large storage folder is ‘DriverStore’ (FileRepository).
    Note. I’m not fully sure if this folder is a repository of only non-active or non-installed drivers.
    Win7 is still shipped with and installs a lot of drivers for nearly everything. Maybe that was obviously till e.g. 10 years ago, but in my opinion no longer needed anymore. Of course, the installation DVD should contain all the drivers and other stuff that is necessary for a successful installation at all the possible hardware. But installing all that data at the local system drive??
    When I have to install some driver, I nearly always look for the latest version on internet. But before that is possible, the ‘vital’ LAN driver has to be installed. However, that driver was (probably) not included in Win7 and for my ASUS P8H77-V motherboard I have to use the ‘Support CD’.
    Note. A good new feature of Win7 is the possibility that the system can search the internet when it needs a driver after installing new hardware. Well, for me that is nearly ‘Plug and Play’ too.
    So, once again: why all that stuff at the local system drive?

    A final (‘funny’) remark about the ‘Cloud’.
    For many years it seems to be normal and it is pushed to use the Cloud for storing nearly everything. But what is Microsoft doing: they put a lot of (even unused or obsolete) data at the local system drive! 🙂

    Note. At the technet website there is a thread with exactly the same title as this article and at the bottom there is a long explanation with remarks and opinions that I like.

  7. If WinSxS was first introduced in Windows ME, how did they actually implement it in that version of Windows? Windows ME only worked in FAT filesystems, and those didn’t have fancy features such as hard links. So they actually duplicated the files in Windows ME so they took twice the space?!

  8. Problem is that because present day hard drives have such monstrous capacity along with sky drive options software developers can now hire a cheaper and less experienced line of employees who do not know how to write programs as efficiently as they used to when we had the smaller capacity drives.
    And they really don’t care, as they now have oodles of gigabytes or terrabytes to write their inefficient programs on, wasting oodles of space at OUR EXPENSE?
    REALLY SUCKS!!!!!!!!!!!!!!!!!!!!!

  9. To the editors of this site,
    Noticed you removed my post;
    Hey, I only spoke the truth without being offensive.
    Sorry if the truth (without being offensive) offended you, but hey it’s America and you also can do as you please even if entails removing truth!!

  10. Sorry Anand, I just noticed the default setting for comments was oldest first.
    Upon finding and clicking “newest first”, I saw both my posts.
    I owe you a sincere apology.

  11. Good write Chris,
    I built my wife’s computer (Win7) and also installed a 120gb SSD (Samsung as I believe they are currently the best). I also bought an extra 120gb SSD and used Samsung’s migration software to clone the installed SSD contents to it. Every once in a while (when I think I need to), I install this fresh cloned SSD, and then using Samsung’s Migration software again the old drive gets reformatted and I clone the newly installed SSD contents to the SSD that I removed for the next possible exchange.
    If ever I feel that either of these drives are close to their end life, I’ll just go out and buy another new Samsung 120gb SSD (cost of about $80 to $100) and clone to it. This way I always have a spare EXCELLENT WORKING CLONED ssd.
    That’s a heck of a lot cheaper than buying a new computer with OS’s that I dislike like Win 8.

  12. See my reply. It’s actually a legacy issue of programmers trying to save space and memory that has failed on the side of compatibility. We should get rid of redistributable components starting with the Microsoft product family and use more of the available space and memory.

  13. Thanks for the input Prom,
    I went to wikipedia and read about legacy systems & issues; for anyone interested here’s a link: http://en.wikipedia.org/wiki/Legacy_system

    I do think that Microsoft should separate OS software for the business world and OS software for the home user who prefers to maintain their own computer. As a fairly experienced home user, the thing I liked about W98, Wme, Wxp is that it was always pretty easy for the home user to examine and maintain his own system. I never used Wvista because I heard it “sucked”. I’m sort of getting used to maintaining my W7 system, although Microsoft has made it much more difficult for the home user to do “his own” exploring & maintenance.

    Relative to the first sentence in my above paragraph, a lot of home users don’t really use a lot of extra software ( maybe just us older folks? – I don’t know).
    As for myself, I use the usual software that is included in the MS OS, a simple graphics program from Irfanview, Office Home & Student 2007 (Initially I had installed Office 2013, but dumped it as they gave me no option not to install their Sky Drive which I did not need or want and believe me uninstalling Office 2013 is not doable (spelling?) unless you download MS tool to do so.

    So, in short, I plead with MS to come out with an OS (maybe call it MSeasy) for the home user & some of us older folks who don’t use that much extra software and would prefer to easily explore and maintain his own system without all that space wasting Legacy crap.

    That’s just my 2 cents.

  14. Good writeout!,

    Dism /Online /Cleanup-Image /RestoreHealth

    ///RestoreHealth: This checks for component store corruption, records the corruption to C:WindowsLogsCBSCBS.log and fixes the corruption using Windows Update or using your Windows installation source. This operation takes approximately 10-15 minutes or more depending on the level of corruption and the speed of your computer.

    Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
    //Using the /ResetBase switch with the /StartComponentCleanup parameter of DISM.exe on a running version of Windows 8.1 removes all superseded versions of every component in the component store.

    To reduce the amount of space used by a Service Pack, use the /SPSuperseded parameter of Dism.exe on a running version of Windows 8.1 to remove any backup components needed for uninstallation of the service pack. A service pack is a collection of cumulative updates for a particular release of Windows.

    From an elevated command prompt, type the following:

    Dism.exe /online /Cleanup-Image /SPSuperseded

  15. Hello
    I was hoping to findout how to run a check on my Win7 x64 Home Premium winsxs folder which seems to be corrupted or missing something. Now I also have a side by side issue, have no start menu (grey), am unable to get online, open any MS Software & have zero restore points. I don’t know where to start. Any suggestions?

  16. Yeah, MS sucks…it’s why Linux took off so, Windows is the commercialism of an OS and that means a divergence from generally accepted sound methodologies and general suckage… look how iOS is now starting to suck! But as a developer of some 25 yrs now, this so-called “dll-hell” wasn’t! And we need to spread accurate information! All DLL’s could be, should be, backward compatible. Older apps would find the same services they expected and only newer apps would call on updated services. It was a fine system until idiots got involved! I mean seriously, MS still doesn’t properly retrieve virtual directory paths but expects them to be at default locations and hard-codes them (Silverlight), Fuck!! MS was the core culprit, THEY started changing dll FILENAMES! But this dll hell concept? Morons on Drugs! It was never a problem, but neither were using INI files for localized app data, but you see how long that lasted relatively! The blind leading the dumb!

  17. WRONG! You can use a compression script!

    REM Stopping windows installer and windows module installer services

    sc stop msiserver

    sc stop TrustedInstaller

    sc config msiserver start= disabled

    sc config TrustedInstaller start= disabled

    REM Backing up the ACL’s for the winSXS folder so if things get broken we can restore them later (this will take a while)

    icacls “%WINDIR%WinSxS” /save “%WINDIR%WinSxS.acl” /t

    REM Taking ownership of the directory and subfolders

    takeown /f “%WINDIR%WinSxS” /r

    REM Granting full rights on winSXS to the logged in user

    icacls “%WINDIR%WinSxS” /grant “%USERDOMAIN%%USERNAME%”:(F) /t

    REM Compressing winSXS files and subfolders ignores in use files

    compact /s:”%WINDIR%WinSxS” /c /a /i *

    REM Restore ownership to TrustedInstaller service

    icacls “%WINDIR%WinSxS” /setowner “NT SERVICETrustedInstaller” /t

    REM Restore the ACL’s that we backed up

    icacls “%WINDIR%” /restore “%WINDIR%WinSxS.acl”

    REM Delete the ACL backup file we created

    del “%WINDIR%WinSxS.acl”

    REM Re-enable windows installer and windows module installer services

    sc config msiserver start= demand

    sc config TrustedInstaller start= demand

    That’s it! the access control list is restored, and you’re good to go.

  18. MS just fool us all with this tools! My winsxs is > 10GB, this tools only help me release less than 2GB space. This folder is still very huge, > 9GB now after cleanup by this tools.

  19. Thanks for the article. I have an external drive for backup that is close to capacity. When looking at contents, I find a large winsxs folder. No idea how it got there. Is it necessary to have it on this external drive that only contains my backup? I checked my c drive and like you said, winsxs is indeed under c:windows

  20. Okay peoples, calm DOWN!

    Winsxs stores every version of every DLL you’ve ever run.

    That’s right, that’s what I said. You’re not havin’ a flashback.

    See, iIt’s characteristic of MS to repair a bad-design glitch with an ugly kludge patch. My winsxs is 18G!

    BUT: look at the files in winsxs subfolders. They’re all, like, 8K.

    They’re just pointers to other files, like shortcuts, except the system uses them, not your desktop. The properties dlg box shows the combined size of all the dll files that these things point to because they figured it’s more useful than the size of a bunch of 8K pointers.

    If you always peek inside stuff like I like to do, open the DLL file with, like, a hex editor or notepad+. Compilers usually put data at the end of the executable image so it’s all together.Plus, you can have a dynamic string pool or context stack. You’ll see all the function names that are in the real DLL, functions that other programs can call.

    Those function names are also in the real DLLs, BTW. I guess they did it that way so the interface’s function names can be retrieved without having to open the (possibly huge) real DLL.

    Now, who can tell Miss Terna why they did that?

    Anyone?

    Beuller?

    They did it to save disk space back in an ancient civilization where a 15M file was big. They thought about how much space would be wasted if every prog installed its own copy of the dlls. If I had been there,at the conference table, I would have said, “No, no, Mister Ballmer, your idea is stupid. Users only have, what, 100 apps installed? Redundant DLLs take how much space, compared to leaving a copy of every single obsolete, unused DLL on the user’s disk forever?

    Ballmer would have hit his fist on the conference table, stood up, and said, “By GOD, you’re right, Luxie! You just saved our reputation for user-oriented quality software engineering! I’m telling your boss to double your salary!”

    And I would have said, “No, no, Mister Ballmer, don’t do that! My reward is just knowing that my excellent work is bringing in lots of Money to Microsoft, so you and the othr managers can can stuff it in your pockets!”

    Now, if you’re one of the damned ( Real Smart), you will notice the sleight of hand. 18G of DLLs are still on my disk; they’re just somewhere else. So this gimmick still uses mondo disk space, but it also uses the extra space that the winsxs pointer files take up.

    Yeah, you, in the back row! Your hand is up?

    “Yes Miss Terna, why don’t they just delete the DLLs at uninstall?”

    Good question, Beuller!

    They can’t delete any DLLs when you deinstall a program because other programs might use the same version of the same DLL. No one in Redmond thought for the DLLs to keep a count of how many different programs installed it. When an uninstall utility sees the count reach zero, it will delete the unused DLL.

    …Well, they COULD have done it that way. Frankly, I’d go with redundant copies. But this is Microsoft software! It’s easier for them just to fill up your HDD with old useless files. It’s their way of saying “fu ck you” to the users. They say that in a rich, splendid variety of ways over there in Redmond!

    Plus, they can spend the time it would take to do it right by looking at the girl programmers and touching themselves under their desks. When they see ME walk by, I’ll smile shyly for a moment so they have to go in the men’s room and yank. God only knows what the stall walls look like in there.

    Nerds! Yucckh!

    Why you always gotta talk about the cool kids who take archery? You’re an icky geek!
    You get a funeral if you don’t wise up and call me (Carl Poppa).

  21. Thanks for this info.
    But yeah im fucked now with a 36GB WinSxS folder on a 120GB SSD. Srew you microcunt!
    And thanks for the links in the comments for the cleanup util, i might need it. 😀

  22. This is typical of Microcrap, their installer .msi files, used my software companies, is also a waster of RAM as it duplicates sometimes more than twice and in hard disk copies itself or parts of itself to different folders, and I have checked and many of the files in WinSxS are duplicated, instead of making .ini files and make smart use of folders they could make it efficient and always working for all software, but no they had to go the cheap and dumb way and screw us all in the butt along with it these Suns of Beaches will eventually pay the consequences, as everything doe, of their own acts and It will be too late for regrets; software titan my a$$!!!

  23. Why should WinSxS directory (almost 8GB now) keep browser files like ‘opera.browser’ and ‘firefox.browser’ ? I uninstalled Opera long back and never installed Firefox!

  24. Windows should garbage clean it’s dependencies, in the same way that JavaScript or other runtime platforms do. Keep a counter of use for each dependency. When the counter reaches 0, it means that nobody is using it anymore, hence delete it automatically. No need for “disk cleanup” or other clonky maintenance procedures from the last century when it’s done properly.

  25. Dependencies should be garbage collected. It’s really simple, a counter has to be maintained somewhere, to keep track of the number of links pointing to a particular dependency. When this number reaches 0 it means that the dependency is not referenced anywhere hence there is no use for it and it can be automatically deleted. This is how it’s done in JavaScript, java, and other garbage collected environments.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link
Powered by Social Snap