1. What is servicing and what does the servicing stack do?
Servicing is the name of configuring Windows updates or Windows features (installing, removing updates/features). This can be done when Windows is running (Online) or against a not running Windows partition/or mounted WIM (offline):
What is servicing? Servicing is the act of installing a role,
feature, service pack or windows update against a Windows OS. Most of
the time servicing is done in an online state. In this case, online
means that the operating system is up and running when a change is
made. Online servicing is what most people do and is usually done via
Windows Update or double clicking a downloaded update. There is also
an offline state. Offline, of course, means that the installation is
happening against a non-running version of Windows. This is what a
lot of larger corporations and OEMs do with their image files, they
mount them with IMAGEX or DISM and then install hotfixes or other
updates against those images to reduce their patch time when the image
is rolled into production.
2. What is CBS
CBS stands for component based servicing and was added in Windows Vista. In older Windows versions, the Setup was based on .inf
files to install features/Updates.
In Windows Vista, the new componentization architecture, known as
Component-Based Servicing (CBS) changes the way that these components
are installed. The CBS architecture is far more robust and secure
than the installers in previous operating systems. Users benefit from
a more complete and controlled installation process that allows
updates, drivers and optional components to be added while
simultaneously mitigating against instability issues caused by
improper or partial installation. CBS allows components and features
from IIS to Windows Media Player to be packaged as small modules that
encompass the full functionality of the component. In other words,
each module contains all of the files, registry settings, and methods
required for a full installation or removal of the component it
contains.
3. What roles do WinSxS play
This folder was added in Windows XP, to have the ability to have 2 different DLL version instaleld side by side (sxs) on a system. Microsoft used this to allow the new Theming support in WinXp, but still keep the old system dlls to not break old Win95 applications. It was also used to fixed the DLL hell. In Win95 you have the issue that a tool requires a special Windows DLL in version 4 and the next tool in version 4.10. If you installed the newer tool it may broke the old program, if you installed the older after the newer tool, the older worked but the newer tool crashes because the DLL doesn't support all required features.
Since Vista, the WinSxS folder was contains all files used by Windows and when you activate a feature, the files are not copied to the destination in C:\Program Files
, they are linked via a hardlink:
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.
4. What roles do Windows Installer play?
this is unrelated to WinSxS, the folder C:Windows\Installer is the folder where the Windows Installer service copies is data to be able to modify or remove installed programs.
5. What roles do Windows Update play?
Windows update downloads the files to C:\Windows\SoftwareDistribution\Download and servicing stack copies the data to WinSxS and tries to create the hardlinks, if this fails (when the files are still used), the operation is pending and the update gets installed at next boot (the configure Windows updates screen at shutdown and boot).
https://blogs.technet.microsoft.com/joscon/2010/06/15/servicing-windows-part-one/, https://blogs.technet.microsoft.com/joscon/2010/07/06/servicing-windows-part-two/ the blog also shows how to use DISM, sfc to interact with the stack and how to fix corruptions – magicandre1981 – 2016-07-05T04:24:24.100
Edited the question to narrow the scope and address the presumed reason for the downvote (the post as originally written had too many separate questions). I'll ask about interacting with the servicing stack and troubleshooting servicing problems in another question. – bwDraco – 2016-07-05T04:45:02.563
It does what it sounds like it does, it updates Windows components, and repairs them, if they become corrupt – Ramhound – 2016-07-05T04:56:19.327
again, read the blog. This is a such complicated topic that it is hard to answer it here. – magicandre1981 – 2016-07-05T15:15:44.387
I've tried to answer it a bit, but it is a large and complicated topic. – magicandre1981 – 2016-07-09T06:42:12.317
@Ramhound I'm not so sure it's that clear cut. I really can't tell if it's literally what it sounds like, a stack of the familiar components that together serve some function, or that plus an actual secretary that gets called the service stack sometimes. Reading the links makes the stack sound like these components acting in tandem, until I see something talking about the service stack looking for dormant binaries to compress. Then it sounds like an agent, except to manually invoke such behavior, I'm told execute
Dism /online /cleanup-image /startcomponentcleanup
. Hello, DISM. – Louis – 2016-07-09T08:30:31.147