Quicker and Cleaner

| | Comments (0)

After my last screed about applet junk I received an email from reader Dean Adams, who has created a batch script that performs cleanup on a QuickTime installation by removing everything that doesn't absolutely have to be there.  It's interesting enough that I thought I would share it here, although be warned that it is supplied AS-IS with no warranty.

Here's Dean's comments about the script:

Basically, the bat file deletes all the unnecessary international support files for both QuickTime and "Apple Software Update." These are located in directories with names like da.lproj, de.lproj, etc. All of these directories (20+ megs, just for QuickTime), except en.lproj, are deleted.

The other half of the cleanup involves removing close to a thousand or so unnecessary keys and values that QuickTime adds to the registry, which are related to the international support files. The bat file can take quite a while to run (thirty minutes or more), although the actual time interval will of course depend on one's system. The last part of the bat file, ":PARSEREG" is the time-hog, so to speak, because it must parse thousands of lines from a reg file that is exported from the key:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
\Installer\UserData\S-1-5-18\Components

A bat file is probably not the most efficient way to accomplish this, but I'm not a programmer. A dedicated executable could, no doubt, do this much faster.

In the bat file I use the env var %USERNUM%, because I wasn't sure that the S-1-5-18 key would be a constant on all XP systems. It seems to be, but I'm not positive of that. FindUserdataNum.bat may be used to verify this and if the key is some name other than S-1-5-18, line 11 in QT_Cleanup.bat would need to be edited.

QT_Cleanup.bat can be run from any directory, but the file QT_folders.txt must be in the same directory. After running the file, one must be sure that they have modified QuickTime's Start Menu shortcuts as well as any other shortcuts that may be present (QuickLaunch bar, etc.). The default shortcuts point to the QuickTime installer and if QuickTime is run from any of these shortcuts, everything that was removed during the cleanup process will be added all over again.

Since the default shortcuts can't be modified (all the options in them are ghosted), I recommend replacing them with shortcuts pointing to QuickTime.exe, in a non-default Start Menu location. This way, they will not be overwritten during a subsequent upgrade or security fix. However, at that time, QT_Cleanup.bat will need to be run again. BTW, it's this perverse running of the QuickTime installer from any of QT's shortcuts that leads to the replacement of the QuickTime Task value in this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

even when it has been previously deleted. This, of course, is what starts QuickTime's reviled tray program.

Note: I have not tried this bat file on a Vista system. (later - I guess QT isn't even available for Vista yet).  [I'm running QuickTime on Vista right now without any real issues, but I have yet to try the cleanup script on a Vista machine myself.  I'm going to create a test system for that purpose later.--ed]

Also, I have used it only on QuickTime installs without iTunes (although I suspect it would still work). iTunes probably adds even more extraneous stuff! Finally, I discovered what appears to be a non-eventful QuickTime bug while researching this a while ago and it has persisted for several versions. This key:

HKCU\Software\Microsoft\Keyboard\Native Media Players\QuickTime Player

contains invalid data in the value AppName. It should contain "QuickTime" but the "e" is always cut off (QuickTim). Also, under the same key, the data for the value ExePath is also invalid. On my system, it's "D:\QuickTime\Qui" ("D:\" is my %ProgramFiles% directory). Obviously, this should be D:\QuickTime\QuickTime.exe. These reg values appear to defy attempts to manually correct them.

If you want to try a "dry run," comment out lines 106 and 107:

reg import %TEMP%\QTclean.reg > NUL

del %TEMP%\QTclean.reg

and no registry changes will be made. Then you can have a look at QTclean.reg. Just copy all the QuickTime files to another location beforehand though, so that they may be easily replaced if needed. Please let me know if you have any trouble with it.

Leave a comment