Updated version of Media Center Diagnostics Kit available for download

To coincide with the release of Update Rollup 2 for Media Center 2005, we have also released an updated version of the Media Center Diagnostics Kit that can be downloaded from this location.

I posted a blog entry about the previous version of test kit and received several comments from customers (such as this) indicating that this test kit would delete recorded TV shows. After receiving those comments, I asked the developer who wrote the Media Center Test Kit about this issue. He provided me with the following information about this issue to hopefully ease concerns you might have about using the Diagnostics Kit on your machine:

Older versions of the Media Center Diagnostics Kit used a bad helper library which deleted recording files under certain circumstances (such as when tests failed). This library has been replaced in the new version of the Media Center Diagnostics Kit and it should be never be deleting recorded content files on the machine.

However, even in this latest Diagnostics Kit the recording files may appear to be missing during test execution because the tool moves them just before running any of the test scripts. This is in place to protect the user from deleting recording files when running scripts because the scripts can do massive damage to the user environment and recording files. This means if you use Task Manager and kill the MCDiag process while a script is running, the Diagnostic Kit is never given the opportunity to restore the moved files.

To protect files, the Diagnostics Kit renames two directories:

  1. The recording XML path (scheduled recordings, etc) - this directory will always be "%ALLUSERSPROFILE%\Application Data\Microsoft\eHome\Recording." The Diagnostis Kit appends a GUID to the end of this directory name. When running a test script, Media Center creates a new directory and recordings XML file. This new directory and file are deleted after the test script finishes and the Diagnostis Kit restores the original directory using the backup copy.
  2. The Recorded TV storage path (the actual recordings themselves) - the default location for this directory is "%ALLUSERSPROFILE%\Documents\Recorded TV" but it can be changed within Media Center, and the actual value can be discovered from the RecordPath registry value located at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording. The Diagnostis Kit appends a GUID to the end of this directory name. When running a test script, Media Center creates a new directory and recording filese. This new directory and files are deleted after the test script finishes and the Diagnostis Kit restores the original directory using the backup copy.

If the Diagnostics Kit cannot rename either of the above directories before running a script (most likely because a file could be in use), it will fail and not run the script. In the new version of the Diagnostics Kit, when the user presses the Run button, they will get a dialog telling them that recording files are being moved and asks them permission to continue doing this. There is also an advisory message that appears during test script execution advising strongly against killing the MCDiag process while it is running test scripts. If you have to kill the process for some reason, you can restore the folders and files manually by copying them from the backup locations described above.