Associating the files with patches.
The "WINDOWS\Installer\
" folder has several key
sub-folders.
You can search for the sub-folder name (without the braces {}
) in the registry.
The key can be searched within the "HKLM\SOFTWARE\
" tree
to get the Software association.
The key would be placed in the Installer
sub-tree on the name ENU_GUID
.
Similarly, in the registry path "HKEY_CLASSES_ROOT\Installer\Products\
",
The key will usually match in a subtree against the "ProductIcon
" name.
There will be a "ProductName
" field next to it that will give you an association.
This search should be script-able with a dir WINDOWS\Installer /d
output
stored to a text file that is processed with a registry search.
The .MSP
files have a level of indirection in the registry.
You should search for the MSP name first in,
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\
That will give you a Patch number (the sub-tree name string) which is to be then searched again in the same path as above. The associated registry sub-tree will give you details for the patch.
Meanwhile, the mouse-over context in my Windows XP explorer also gives basic information on the patch. Have you checked that already?
Older data:
Use msizap to remove orphaned cached Windows Installer Data Files to increase free disk space.
Msizap is a command-line tool that can delete the configuration data that Windows Installer maintains for products that it installs, including the directories, files, registry subkeys, and registry entries in which Windows Installer stores configuration data.
Running msizap.exe with the G
parameter removes orphaned cached Windows Installer data files for all users
The article discusses up to Windows Server 2003.
Update: This Microsoft KB description also limits at Server 2003.
It should work for Server 2008, or there would be another version for it.
The article describes existence of two versions.
There are two versions of MSIZAP.EXE:
MsiZapA.exe (for use in Windows 95, Windows 98 and Windows ME), and
MsiZapU.exe (for use in Windows NT, Windows 2000, Windows XP, and Windows Server 2003). The appropriate executable should be renamed MsiZap.exe.
Download references -- in case that link goes dead.
Msizap can be downloaded as a part of the Microsoft Windows Server 2003 Support Tools or the Windows Installer CleanUp Utility (EXE). I was unable to find the Windows Installer CleanUp Utility by searching Microsoft’s download site, so note that as of today the file’s name is msicuu2.exe if you the above link goes dead in the future.
If you don’t want to install the Windows Installer CleanUp Utility, use a program such as Universal Extractor (aka UniExtract) to extract the individual files. Once you extract the files, you’ll notice msizap.exe does not exist, but you will find MsiZapA.exe and MsiZapU.exe.
GNU du has the --dereference option, which dereferences symbolic links when computing disk usage. However, du refuses to count the same space twice, which may be a deal-breaker in your situation:
% mkdir foo bar baz
% dd if=/dev/zero of=foo/test bs=1024 count=10000
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 0.0176239 s, 581 MB/s
% (cd bar; ln -s ../foo/test)
% (cd baz; ln -s ../foo/test)
% du -hc bar baz
4.0K bar
4.0K baz
8.0K total
% du -hc --dereference bar baz
9.8M bar
4.0K baz
9.8M total
If you don't have multiple symlinks to the same target, though, I think --dereference does what you want.
Best Answer
There are a huge number of ways you could do this, all dependent on how much infrastructure you want to plumb versus doing things manually:
Periodically run a directory listing on the volume in question and annotate the free space in a spreadsheet. Subtract the free space from the total volume size to get the allocated space. (Not necessarily the file size, though, because using this method the on-disk size of compressed files would be reflected.)
Write a script to periodically gather this information (using built-in tools like
dir
orchkdsk
orperfmon
or WMI, or any of a vast number of other built-in or 3rd party tools) and store in a spreadsheet, database, etc.As @tombull89 says, use File Server Resource Manager to generate reports. Slice/dice that data to get the trending information you need.
Take the output from your backup software for the server in question and either manually for via script slice/dice the data. (I tend to do this because I'm more interested in the raw size of the data, irrespective of NTFS compression.) Depending on your backup software you may already have a treasure-trove of historical data here to "mine".
There's a large number of ways to solve this problem, all dependent on how much work you want to do up front versus manually over time.