Windows 8.1, WinSxS and C++

Translate This Page

Windows 8.1, WinSxS and C++

  • Comments 4

The folder winsxs in the Windows folder is usually quite large and you never want to delete it, never ever touch anything in it.  If you do, you will enter what used to be called DLL Hell. WinSxS stands for Windows side by side.  At least till Windows 8.1.

Why is Winsxs so big and gets bigger?

All of the components in the operating system are found in the WinSxS folder –  this location is referred to as  the component store.  Each component has a unique name that includes the version, language, and processor architecture that it was built for.  The WinSxS folder is the only location that the component is found on the system, all other instances of the files that you see on the system are “projected” by hard linking from the component store.  If you look at one of the files in one of the folders, you don’t see much, and if you look at another folder the files are different.  In either case do not make any changes.

For more info and references for that paragraph see: http://www.winvistaclub.com/f16.html and somewhat older link: http://blogs.technet.com/b/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx

Why is this?  The files in the folders are pointing to DLLs that are located in the Windows\System32 folder elsewhere on the computer.  The size reported in Explorer shows the size report for not only the file in the Windows\System32 it shows it as the file size in WinSxS even though the actual file in WinSxs is quite small.  This file size reporting  can be repeated a number of times additively in the File Explorer reporting, making the reported size seem much larger when viewing the report size using file explorer than it really is.  Other, safe tools, which I won’t link to for security reasons will also show the same additive size reports.  But in any case, do not make any changes to this file with one exception which is new for Windows 8.1: You can use the Deployment Image Servicing and Management tool: Dism.exe (I changed this later in the day 8/25/2013 and had originally written disn.exe which is incorrect).

Run Disn.exe from a cmd shell with administrator privileges (or elevated privileges) and you can get some clean up on the files.  I won’t put the string you would use in this blog, but you can get it from this link: Determine the Actual Size of the WinSxS Folder and about half down the page you will see the process.

The output looks like the following, which is also shown in the link above.

image

 

What does this have to do with C++?

A C++ Developer could build a DLL.  The DLL could be referenced in the WinSxS folder.  More to follow.  Eventually.

Leave a Comment
  • Please add 6 and 5 and type the answer here:
  • Post
  • Subtle but important typo; disn.exe should be dism.exe.

  • More to follow ?? whats this ?? a teaser ???

  • Thank you Wes, that is definitely a typo of importance!

  • Yep, there is more to come, I am working on showing how deployment or installation files look in WinSxS.

Page 1 of 1 (4 items)
Generic Content

Legal Note:

  1. The author, Sam Stokes, is an employee of Microsoft
  2. There is no guarantee that anything I write is correct, I do try to make sure that what I write is correct.
  3. Use anything written in this blog at your own risk
  4. Test what I write about before using the information
  • Sometimes posts will disappear because I realized that they really don't fit with the total chaos of what I write about
  • Links are tested and available on date of publication, what others do with their links are out of my control

Restrictions:

  • Whatever I write on this blog is unedited by management or anyone, which should be obvious from the randomness of the blog.  I simply write about things I like.
  • Microsoft does not restrict me in anyway, so I generallyblather about whatever I want to.
  • For personal reasons I will not write about:
    • Company confidential stuff, mainly because Microsoft is more transparent than any company I have ever worked for.
    • Other people unless they give me permission to write about them