Sign in to follow this  
Followers 0
HawkMan

Large winsxs folder

29 posts in this topic

Is there anything I can do to reduce the size of the winsxs folder ?

Currently I have a winsxs folder of 6.5 GB, wich is over half the size of my total windows folder... searches on the winsxs folder didn't help me much. and it seems like there's a lot of stuff I have absilutely no use for in there.

Share this post


Link to post
Share on other sites

the folder is for apps that are side by side,do not touch it unless you know what you are doing.

Share this post


Link to post
Share on other sites
the folder is for apps that are side by side,do not touch it unless you know what you are doing.

Can you clarify what that means please?

Share this post


Link to post
Share on other sites

That's the native assembly cache. Libraries which are shared by multiple programs are stored there. It's the magic thing that (more or less) fixed "DLL Hell."

Deleting anything in there will probably break apps on your system, and could prevent your entire system from working properly. Don't mess with it.

Share this post


Link to post
Share on other sites

Mine is about 1.6gb. Cleared out much of it with Vlite during the install. Much of its bulk is useless, like foreign language packs, but other stuff is vital.

Share this post


Link to post
Share on other sites

The safest way to clean it out is by simply uninstalling apps in your system via Add/Remove Programs, I'm afraid. I can understand if some apps leave those files there too, though, even after uninstall, just because it's usually DLL's intended to be shared between apps that resides there. So some/many may be left behind even if no app no longer use them. But I'm not aware of a "safe" way to detect which are used by actual installed apps or not.

Share this post


Link to post
Share on other sites

I understand the concept of WinSXS but why do I need to have 7 count 'em 7 versions of iexplore.exe there? I use a web based app that periodically scans my machine to be sure I have the most recent version of applications and drivers. Today when it ran it found these 7 instances. This makes NO sense. I understand multiple instances of the same DLL, but not this.

Gary

Share this post


Link to post
Share on other sites

You can search for video files there and delete them.

Share this post


Link to post
Share on other sites
I understand the concept of WinSXS but why do I need to have 7 count 'em 7 versions of iexplore.exe there? I use a web based app that periodically scans my machine to be sure I have the most recent version of applications and drivers. Today when it ran it found these 7 instances. This makes NO sense. I understand multiple instances of the same DLL, but not this.

Gary

Just leave it alone, and don't question why it does the things the way it does: Mucking about with that folder is literally begging Vista to stop working properly.

Share this post


Link to post
Share on other sites
Just leave it alone, and don't question why it does the things the way it does: Mucking about with that folder is literally begging Vista to stop working properly.

Oh, I realize that, but it just seems BIZARRE that it would keep 7 versions of an application. Again, I understand the need to keep multiple versions of a DLL (I am an MCSP), but why an application??? No other app is going to be able to request a specific version of an EXE file like it can a DLL. This just appears to be bloat for bloats sake.

Anyone have any technical insight into why Vista is keeping copies of EXE's in WinSXS?

Gary

Share this post


Link to post
Share on other sites

it helps to avoid app compatability problems and dll hell problems,leave it alone as windows will manage it for you.

Share this post


Link to post
Share on other sites
Oh, I realize that, but it just seems BIZARRE that it would keep 7 versions of an application. Again, I understand the need to keep multiple versions of a DLL (I am an MCSP), but why an application??? No other app is going to be able to request a specific version of an EXE file like it can a DLL. This just appears to be bloat for bloats sake.

Anyone have any technical insight into why Vista is keeping copies of EXE's in WinSXS?

Gary

Quite possibly from different Windows Updates being applied that are being cached (they may also be cached in C:\WINDOWS\SoftwareDistribution). It's basically a backup mechanism to make sure that everything works correctly. WinSxS keeps copies of different versions of DLL's in case an application explicitly requires or requests one. Leave it alone.

Share this post


Link to post
Share on other sites
Oh, I realize that, but it just seems BIZARRE that it would keep 7 versions of an application. Again, I understand the need to keep multiple versions of a DLL (I am an MCSP), but why an application??? No other app is going to be able to request a specific version of an EXE file like it can a DLL. This just appears to be bloat for bloats sake.

Anyone have any technical insight into why Vista is keeping copies of EXE's in WinSXS?

Gary

Well, you can call functions and access resources in EXEs the same way you can from DLLs (You generally don't use EXEs as libraries like that, but you certainly can.).

The only real difference between DLLs and EXEs is that DLLs don't contain entry points, so they can't be executed by themselves.

Share this post


Link to post
Share on other sites
Quite possibly from different Windows Updates being applied that are being cached (they may also be cached in C:\WINDOWS\SoftwareDistribution). It's basically a backup mechanism to make sure that everything works correctly. WinSxS keeps copies of different versions of DLL's in case an application explicitly requires or requests one. Leave it alone.

I set about once to delete the ENTIRE folder. I deleted a good amount, and could still reboot and work normally. But at some point, and I'm not sure when---a reboot led to a reboot-loop. The ONLY way to determine what is safe and what is not safe to delete from that folder is by trial and error, careful documentation, and the patience to reinstall Vista a gazilion times. But...oh the fame that awaits the person who can write the definitive guide on this, like that fellow did with "slimming down XP".

Share this post


Link to post
Share on other sites
it helps to avoid app compatability problems and dll hell problems,leave it alone as windows will manage it for you.

I realize that. I said in the message that you replied to that I am an MSCP and understand the reasoning behind WinSXS and DLL hell. I don't understand the need for EXE files there though.

Quite possibly from different Windows Updates being applied that are being cached (they may also be cached in C:\WINDOWS\SoftwareDistribution). It's basically a backup mechanism to make sure that everything works correctly. WinSxS keeps copies of different versions of DLL's in case an application explicitly requires or requests one. Leave it alone.

Yes, it keep DLL's. I know that and I know WHY it does that. But what about 7 versions of an EXE? That makes NO sense.

Well, you can call functions and access resources in EXEs the same way you can from DLLs (You generally don't use EXEs as libraries like that, but you certainly can.).

The only real difference between DLLs and EXEs is that DLLs don't contain entry points, so they can't be executed by themselves.

Yeah, technically you COULD use an EXE as a library. I have been doing Windows programming since Windows 1.0 and can not remember the last time I saw ANY such use. I also think that would be TOTALLY outside the development guidelines Microsoft suggests for developers. With todays development environment, I think you'd have to jump through all sorts of hoops to use an EXE as a library. So, I still don't understand why WinSXS needs 7 versions of Internet Explorer???

I am going to ask this on the MSDN developers forum and see if I can get some explanation. I'll let you folks know what I find out.

Gary

Share this post


Link to post
Share on other sites
I am going to ask this on the MSDN developers forum and see if I can get some explanation. I'll let you folks know what I find out.

Thank you for pursuing this, I'm looking forward to see what they say. :)

Very disappointed that so many people are apparently ignoring you when you say "but WHY???"... Some of us do care about the why! Just telling us "don't touch. it's magic." just doesn't cut it.

Share this post


Link to post
Share on other sites
Yeah, technically you COULD use an EXE as a library. I have been doing Windows programming since Windows 1.0 and can not remember the last time I saw ANY such use. I also think that would be TOTALLY outside the development guidelines Microsoft suggests for developers. With todays development environment, I think you'd have to jump through all sorts of hoops to use an EXE as a library. So, I still don't understand why WinSXS needs 7 versions of Internet Explorer???

I've seen it done with .NET assemblies a few times.

Share this post


Link to post
Share on other sites
I've seen it done with .NET assemblies a few times.

Yes, there is no doubt that you can use an EXE as a library. But as I think we both agree it is way out of the "norm" and if memory serves me, is a real "no no" under the Windows development guidelines. It still seems odd, though ESPECIALLY in relation to Internet Explorer 6, don't you think? I can't think of an single scenario, where by an application would call for a SPECIFIC version of IE6. If I had found lets say version 4 5 and 6 of Internet Explorer in WinSXS, I could see a POSSIBLE case to be made for that. But seven minor versions of IE does not make any sense at all.

I am awaiting a response in the MDSN forums. Film at 11.

Gary

Share this post


Link to post
Share on other sites

Vista doesn't have IE6, but yeah, I understand where you're coming from.

Share this post


Link to post
Share on other sites

Did you install any foreign language packs? If you turn on optional updates and let Windows install everything, you might have gotten dozens of foreign language packs you probably don't want.

I just checked and mine is about 4 GB, without any language packs.

Also, I don't believe a non-.NET exe can be loaded as a library. You can use a .NET exe as a library because it isn't a native Windows exe, just a stub that loads the program using the .NET runtime.

Share this post


Link to post
Share on other sites

True ... why so many (upto 7 someone here said) versions of file/s have to be stored is indeed intriguing ! Nevertheless, it is best not to delete anything from the folder, as it could break an application or even make your system un-workable. I have put info in brief about The Secret Of Vista's Winsxs Folder at my site; but yes I too would like to learn the answers to some of the questions raised here.

Share this post


Link to post
Share on other sites

This is becoming unmanageable as far as backups go..I already have over 600 mgs in my common files and 6+ gigs in winsxs... Is this thing going to just keep growing forever?

I may have to rethink my partitioning and backup strategies .

Share this post


Link to post
Share on other sites
Yeah, technically you COULD use an EXE as a library. I have been doing Windows programming since Windows 1.0 and can not remember the last time I saw ANY such use. I also think that would be TOTALLY outside the development guidelines Microsoft suggests for developers. With todays development environment, I think you'd have to jump through all sorts of hoops to use an EXE as a library. So, I still don't understand why WinSXS needs 7 versions of Internet Explorer???

People use EXEs as COM servers all the time. wmplayer.exe, for instance. However, I'm not sure there are any cases where side-by-side EXEs are actually used in that way. It's possible that support exists for that, however.

My guess is that they're also kept there for rollback purposes, assuming these are Windows components you're seeing that have been updated multiple times by WU.

This is becoming unmanageable as far as backups go..I already have over 600 mgs in my common files and 6+ gigs in winsxs... Is this thing going to just keep growing forever?

I may have to rethink my partitioning and backup strategies .

You back up WinSxS?

Also, I don't believe a non-.NET exe can be loaded as a library. You can use a .NET exe as a library because it isn't a native Windows exe, just a stub that loads the program using the .NET runtime.

What do you mean by "loaded as a library?" Do you mean loaded in-process? Surely, tons of native EXEs are run as out-of-process "libraries" (COM servers and the like).

Share this post


Link to post
Share on other sites

You Guys asked what is it and why is it so big and can i delete it well here's the full skinny on WINSXS

A commonly asked question among people looking at a Windows Vista or Windows Server 2008 installation is ?why is the WinSxS folder so big?!? To answer that question I need to first describe componentization, and how components are managed in Windows Vista.

One of the largest changes between previous versions of Windows and Windows Vista was a move from an INF described OS to componentization. A component in Windows is one or more binaries, a catalog file, and an XML file that describes everything about how the files should be installed. From associated registry keys and services to what kind security permissions the files should have. Components are grouped into logical units, and these units are used to build the different Windows editions.

All of the components in the operating system are found in the WinSxS folder ? in fact we call this location 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. Let me repeat that last point ? there is only one instance (or full data copy) of each version of each file in the OS, and that instance is located in the WinSxS folder. So looked at from that perspective, the WinSxS folder is really the entirety of the whole OS, referred to as a "flat" in down-level operating systems. This also accounts for why you will no longer be prompted for media when running operations such as System File Checker (SFC), or when installing additional features and roles.

That explains why the folder starts off big, but not why it gets larger over time ? the answer to that question is servicing. In previous versions of Windows the atomic unit of servicing was the file, in Windows Vista it?s the component. When we update a particular binary we release a new version of the whole component, and that new version is stored alongside the original one in the component store. The higher version of the component is projected onto the system, but the older version in the store isn?t touched. The reason for that is the third part of why the component store gets so large.

Not every component in the component store is applicable, meaning that not every component should be projected onto the system. For example, on systems where IIS is available but has not been installed, the IIS components are present in the store, but not projected into any location on the system where they might be used. If you?re familiar with how multi-branch servicing works in previous versions of Windows then it?ll make sense to you that we have a different version of the component for each distribution branch and service pack level, and that all these different versions are also stored in the WinSxS folder, even if they?re not immediately applicable. So a single Post SP1 GDR package that contains an update to one component will end up installing four versions of that component in the WinSxS folder ? double that on a 64 bit operating system for some components.

Now that you know why the store can grow to be so large, your next question is probably to ask why we don?t remove the older versions of the components. The short answer to that is reliability. The component store, along with other information on the system, allows us to determine at any given time what the best version of a component to project is. That means that if you uninstall a security update we can install the next highest version on the system ? we no longer have an ?out of order uninstall? problem. It also means that if you decide to install an optional feature, we don?t just choose the RTM version of the component, we?ll look to see what the highest available version on the system is. As each component on the system changes state that may in turn trigger changes in other components, and because the relationships between all the components are described on the system we can respond to those requirements in ways that we couldn?t in previous OS versions.

The only way to safely reduce the size of the WinSxS folder is to reduce the set of possible actions that the system can take ? the easiest way to do that is to remove the packages that installed the components in the first place. This can be done by uninstalling superseded versions of packages that are on your system. Service Pack 1 contains a binary called VSP1CLN.EXE, a tool that will make the Service Pack package permanent (not removable) on your system, and remove the RTM versions of all superseded components. This can only be done because by making the Service Pack permanent we can guarantee that we won?t ever need the RTM versions.

So yes, the WinSXS folder is very large, and it will continue to grow as the OS ages. I hope that this clears up some of the questions about why that is, and what you can do about it. Note that the Windows servicing structure and the layout of the store is subject to change.

Joseph Conway

Senior Support Escalation Engineer

Microsoft Enterprise Platforms Support

Posted: Wednesday, September 17, 2008 2:18 PM by jeffhugh

Filed under: Windows Server 2008, Windows Vista

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.