Draft:Documenting file differences

Back to Draft:Windows build FAQ

This page provides instructions on how to perform file differences between two different builds. This can be helpful for finding files that are added or removed between the builds.

Notes

  • Builds should be compared with the last available build. If a build between the builds being compared later becomes available, the original comparisons can be kept for historical purposes while a new one for the new build can be added.
    • Example: Build 2257 and 2267 were initially compared, then build 2264 was later made available. The original 2257 comparison can be kept on the build 2267 page, and a new comparison with build 2264 can be done.
  • Only compare two builds with the same SKU. Do not compare a client build with a server build, a Home build with a Pro build, etc. If the previous available build isn't in the same SKU as the one being compared, ignore it until the SKU becomes available.
  • Use a fully clean install of the builds under the same configuration on both builds for best results. During setup, all setup components should be installed (including optional components that aren't enabled by default, unless they are unable to be installed properly). Avoid installing any additional programs before comparing the builds, including any guest additions software provided by hypervisors or anything on the installation media that setup doesn't automatically install. This ensures no different driver/system files are used due to a different configuration between the two installations.
  • Don't compare builds that contains too many under-the-hood changes that would be nearly impossible to legitimately compare. These often includes major kernel overhauls or any builds based on entirely different operating system versions.

Instructions

There are different ways to compare the files; but it is preferred to use the install media method.

Compare the installation media

Automatic

I made an ISO comparison tool that can document file differences more quickly, preferably for the more common types of formats used in installation media. Not every format is supported though; use manual comparison if the program does not work for the selected installation media.

Manual

  1. Install WinMerge.
  2. Use an extraction tool (such as 7-Zip or mounting the drive manually and copying files) to obtain the contents of the following, depending on the version:
    • DOS Windows: All the files in each of the install floppies.
    • Windows 9x: All files in RETAIL, WIN95, WIN9X, WIN98, or WINME;
    • Windows NT (legacy "i386" install method): All directories in ALPHA, AXP64, AMD64,IA64, MIPS, PPC or I386 - if AMD64/x64 or IA-64, also include the contents of the I386 directory wherever possible;
    • Windows NT (WIM install method): The corresponding SKU's image index in install.wim (via DISM /Mount-Image or wimlib-imagex)
  3. Copy these files into a working directory.
  4. Repeat steps 2-3 for the build you want to compare with, using a different working directory.
  5. If you have transferred the files to two working directories, you must move all the subfolder files to the root folder by searching * -type:"file folder" and cutting all files and pasting them to the root folder of the working directory of that build. Delete the subfolders when the moving is done.
  6. You must extract all files that end with a _ or those stored in CAB files. Use the expand *.* /r command in each working directory to extract the files. Delete the compressed files by searching for *.*_ and *.CAB in the working directory, then sending the contents to the Recycle Bin.
  7. Open WinMerge and press the Open button in the toolbar (or go to File > Open...).
  8. Enter the two drives/directories to be compared and press Compare.
  9. After the drives/directories are fully scanned, use the View menu bar option to disable "Show Identical Items" and "Show Different Items". Enable "Show Left Unique Items".
  10. Select all of the files and move/copy the files to a separate "removed" folder.
  11. Repeat steps 9 and 10, this time disabling "Show Left Unique Items" and enabling "Show Right Unique Items", moving/copying to a different "added" folder.
  12. Open PowerShell, change the current directory to the "removed" folder, and run the following command (if it errors out, you didn't delete all of the subdirectories):
Get-ChildItem * | ForEach-Object { 
    Write-Host "|-"
    Write-Host ("|" + $_.Name)
    Write-Host ("|" + [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileDescription)
    Write-Host ("|" + [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion)
}
  1. Repeat for the "added" folder.
  2. Copy the output of the PowerShell commands (should list the output as a table format). Create a page called Document:<name of page document will be on> file differences, then implement it as a table using the following format below:
{| class="wikitable"
<caption>Added files</caption>
!Name
!Description
!Version
<enter PowerShell output from "added" folder here>
|}
{| class="wikitable"
<caption>Removed files</caption>
!Name
!Description
!Version
<enter PowerShell output from "removed" folder here>
|}
  1. To add the file differences page onto an article, add the following section:
== File differences ==
{{Collapse top|title=The following files have been introduced or removed compared to [[link to previous build]]:}}
{{:Document:<name of document>}}
{{Collapse bottom}}

Installing the build in two VMs

  1. Install WinMerge.
  2. If you are planning to install a build in VirtualBox or QEMU, you should use a VMDK disk to make it easier to mount the disk in Windows.
  3. Install the two builds you want to compare. They should be available builds that are adjoining each other. Try to use the same VM configuration on both builds.
  4. Allow the host computer to access the files of the builds:
    • If you are using a VMDK file, use VMware Workstation or OSFMount to mount the drives.
    • If you are using an IMG file, create two working directories; one for each build you are comparing. You will then need to open the drive in WinImage and manually copy all the files to the directory. Transfer the files of each build to their own working directory.
  5. If you have transferred the files to two working directories, you must move all the subfolder files to the root folder by searching * -type:"file folder" and cutting all files and pasting them to the root folder of the working directory of that build. Delete the subfolders when the moving is done.
  6. Open WinMerge and press the Open button in the toolbar (or go to File > Open...).
  7. Enter the two drives/directories to be compared and press Compare.
  8. After the drives/directories are fully scanned, use the View menu bar option to disable "Show Identical Items" and "Show Different Items". Enable "Show Left Unique Items".
  9. If there are subdirectories, expand all of them (ignore the config, Registration, and repair folders). Select all of the files except the subdirectories themselves and copy the files to a separate "removed" folder.
  10. Repeat steps 8 and 9, this time disabling "Show Left Unique Items" and enabling "Show Right Unique Items", copying to a different "added" folder.
  11. If there are subfolders in the "removed" or "added" folders, perform step 5 to move them to the root folder and delete the subdirectories.
  12. Open PowerShell, change the current directory to the "removed" folder, and run the following command (if it errors out, you didn't delete all of the subdirectories):
get-childitem * | foreach-object { 
    Write-Host "|-"
    Write-Host ("|" + $_.Name)
    Write-Host ("|" + [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileDescription)
    Write-Host ("|" + [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion)
}
  1. Repeat for the "added" folder.
  2. Copy the output of the PowerShell commands (should list the output as a table format). Create a page called Document:<name of page document will be on> file differences, then implement it as a table using the following format below:
{| class="wikitable"
<caption>Added files</caption>
!Name
!Description
!Version
<enter PowerShell output from "added" folder here>
|}
{| class="wikitable"
<caption>Removed files</caption>
!Name
!Description
!Version
<enter PowerShell output from "removed" folder here>
|}
  1. To add the file differences page onto an article, add the following section:
== File differences ==
{{Collapse top|title=The following files have been introduced or removed compared to [[link to previous build]]:}}
{{:Document:<name of document>}}
{{Collapse bottom}}