Windows Vista/2008 space eater -- hibernation and winsxs folder

标签:
windowsspacehibernationwinsxsfolderit |
分类: 工作 |
The Hiberfil.sys hidden system file is located in the root folder of the drive where the operating system is installed. The Windows Kernel Power Manager reserves this file when you install Windows. The size of this file is approximately equal to how much random access memory (RAM) is installed on the computer.
The computer uses the Hiberfil.sys file to store a copy of the system memory on the hard disk when the hybrid sleep setting is turned on. If this file is not present, the computer cannot hibernate.
To make hibernation
unavailable, follow these steps:
1.Click Start, and then type cmd in the Start Search box.
2.In the search results list, right-click Command Prompt, and then
click Run as Administrator.
3.When you are prompted by User Account Control, click
Continue.
4.At the command prompt, type:
powercfg.exe /hibernate
off
5.Type exit and then press ENTER to close the Command Prompt
window.
To make hibernation
available, follow these steps:
1.Click Start, and then type cmd in the Start Search box.
2.In the search results list, right-click Command Prompt, and then
click Run as Administrator.
3.When you are prompted by User Account Control, click
Continue.
4.At the command prompt, type:
5.Type exit and then press ENTER to close the Command Prompt
window.
WinSxS (Windows
Side-by-Side) directory:
Content is added to this directory in response to installing applications, enabling packages in the add-remove-programs UI, and installing Windows Out-of-Band releases. Content is removed from this directory as a result of uninstall + scavenging - a topic for another time. One important note - uninstalling your application or Windows app will not necessarily remove the physical bits from the system. The servicing stack marks the bits as unusable and prevents their use through "normal" means. Files and directories will be removed over time as the servicing system cleans up after itself. Administrators should not, for any reason, take it upon themselves to clean out the directory - doing so may prevent Windows Update and MSI from functioning properly afterwards. Preventing accidental deletion from the directory is accomplished by putting a strong security descriptor on the directory that inherits to its children.
In Windows Vista, the directory %windir%\WinSxS has much stronger protection on it than it did in Windows XP and Server 2003. The owner/group is now a SID named "Trusted Installer", a service SID used to start the TrustedInstaller service. Users other than the trusted installer are granted only generic-read/generic-execute by default. This increased protection ensures that only the trusted installer service is allowed to modify the servicing-related metadata and files. If a limited user could modify a file in the directory, for example, they could convince the servicing stack to overwrite one binary with another when the next administrator comes along to enable the Games for Windows package.
You may or may not have ever peeked into the %windir%\winsxs directory on your system. If you haven't, now would be a good time. First thing you'll notice is that there are a lot of those funkily-named directories. You might further notice that there seem to be several that differ only by what looks like a version number and some random-looking eight characters on the end of the name. Next you might see that some of them differ only by the second-to-last stringish thing. Lastly, note that mostly, the strings can be deciphered with a little help.
Each shared component (in the winsxs directory) gets its own directory into which its payload bits are placed. Somehow, we have to generate (mostly) unique & repeatable directory names for this purpose. The requirements of directory names are reasonably simple - can't overall be more than MAX_PATH (260) characters, can't contain certain characters, etc. Given the naming requirement, it was impossible to use the entire identity as the name of the directory, as someone could name their component "foo\bar" and mess things up. With the extensibility requirement for identities themselves, we couldn't possibly use the entire identity, as the set of tuples would end up being far longer than MAX_PATH. Most importantly, we wanted the directory names to be readable to your average administrator or PSS representative. Finally, generation of the keyform from an identity had to be fast.
The recently released Windows Vista SP2 has shown significant enhancement and improvement in terms of compatibility, reliability, performance, and speed compared to the earlier SP1. If users had noticed, after installing the Vista SP2, the hard disk’s space had been taken up substantially. This was mainly because a lot of old Vista RTM and SP1 backup files and components were not deleted upon the installation of new SP2.
To housekeep your hard disk and clean up those old and unused SP1 backup files, users probably can try the new Service Pack Cleanup Tool which is also named as compcln.exe. This successor for SP1 cleanup tool, Vsp1cln.exe, can easily remove all the system files (RTM & SP1) inherited from the older versions but replaced by Vista SP2.
But you have to make sure you want to do that, because it will make your system permenatly stays in that SP level!!!
If you runneng
SP2
Running this compeln.exe tool is pretty
simple:
1. Click Start>All
Programs>Accessories>Command Prompt
or click Start>Run and type cmd to open Command
Prompt Windows
2. Execute the command “Compcln.exe”. The path is
“c:\Windows\System32 \compcln.exe”.
3. Users will be prompted a question whether to keep Vista SP2
permanently in the system.
4. Once users type “Y” and press enter, the system will start
performing the windows components clean.
After the cleansing process, users will notice the free hard disk space has increased substantially
If you have
SP1:
Service Pack 1 contains a binary called VSP1CLN.EXE,
a tool that will make the Service Pack package permanent (not
removable) on your system,
More
info:
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
http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/82cb7579-d5fc-4339-b663-1da9545b0818
http://support.microsoft.com/kb/920730