Virtualising Apple QuickTime 7.x

February 3, 2008

in Virtualisation

QuickTime App-V box Updated 04/05/2010

Here’s how to create a custom Apple QuickTime 7.x installation for virtualisation. This post specifically deals with virtualising QuickTime with Microsoft App-V, but the general process should be similar for any application virtualisation product.

If you’ve ever looked at deploying Apple QuickTime on Windows you have no doubt run into the challenges in configuring settings for this application. Successfully virtualising QuickTime requires that users receive the correct preferences before they run the application.

For some absurd reason QuickTime stores part of it’s preferences in the registry, while the other half is stored in the file system. It’s the those preferences that have the most visual impact on users that are stored in the file system.

Preferences are stored in the local portion of the user profile, which by default is not virtualised. Because of this, any settings you may configure will not be included in a QuickTime App-V package. Preferences are stored here:

  • %USERPROFILE%\AppData\LocalLow\Apple Computer\QuickTime\QuickTime.qtp (Windows Vista and above)
  • %LOCALAPPDATA%\Apple Computer\QuickTime\QTPlayerSession.xml (Windows Vista and above)
  • %USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime\QuickTime.qtp (Windows XP / Windows Server 2003)
  • %USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime\QTPlayerSession.xml (Windows XP / Windows Server 2003)

There are several ways of addressing this issue when virtualising QuickTime:

  1. Change the preferences folder location. A single registry change can tell QuickTime to store preferences in the roaming profile
  2. Copy the preferences files to the local profile at runtime using scripts in the OSD file or other tools (e.g. Group Policy Preferences)
  3. Include the local AppData location which is excluded by default; however the cache is also stored here

Installing QuickTime

Before I look at setting preferences, I’ll address automating the installation of QuickTime, because I want to make this sequence repeatable and I want to control which components are installed. Specifically I want to avoid installing the Apple Software Updater.

Download the QuickTime installer (without iTunes), available from the Apple web site (7.6.6 at the time of writing). Extract this file to obtain the included Windows Installer files.

Extracted QuickTime installer

Automating the installation of QuickTime is very simple once you know how. An excellent source for finding that information is at AppDeploy.com. The installation script I have created does not use custom transforms and will perform the following basic steps:

  • Install Apple Application Support, which is now a required component
  • Install Apple QuickTime to the virtual drive although you could use VFS install if you prefer
  • Ensure Apple Software Updater is not installed (by not installing AppleSoftwareUpdate.MSI)
  • Delete any icons not required – I recommend not giving users access to Picture Viewer because it does not honour preferences correctly
  • Delete the QTTASK.EXE application from the Run registry key
  • Ensure users are not prompted to reclaim file associations by the ActiveX control

Download the copy of the install script here:

QuickTime App-V install script QuickTime App-V install script

QuickTime preferences

There are a number of settings that you should consider in your QuickTime package, which can include registration information for QuickTime Pro:

File type associations – don’t forget to prevent QuickTime from attempting to re-associate file types at launch. Selecting Yes here, will capture the default file types.

QuickTime file type associate

When the player starts, open Edit / Preferences / Player Preferences and prevent the Content Guide from displaying at application start.

QuickTime Player Preferences

Open Edit / Preferences / QuickTime Preferences to star the QuickTime Control Panel. You may want to prevent movies from playing automatically. Useful for the HD videos that may take some time to download.

QuickTime Preferences Browser

Prevent QuickTime from checking for updates on launch. When virtualising it would also be useful to prevent access to this control with a 3rd party tool such as AppSense Environment Manager (or hack the DLL with Resource Explorer yourself).

QuickTime Preferences Update

The QuickTime notification area icon should be disabled by default, but check that here:

QuickTime Preferences Advanced

If you configure QuickTime via a standard installation, you can automate this process by copying the preferences files to the correct locations during installation.

Note: If you want to prevent users from accessing the QuickTime Control Panel applet when running QuickTime Player, rename or delete the CPL file: <Install folder>\QTSystem\QuickTime.cpl. When users access the QuickTime Preferences menu item, nothing will happen.

Change the preferences folder location

To change the folder location for storing preferences modify the following registry value as a part of your capture process:

HKEY_CURRENT_USER\Software\Apple Computer, Inc.\QuickTime\LocalUserPreferences\FolderPath

For this to work correctly, you must add a trailing slash to the path, for example: %APPDATA%\Apple Computer\QuickTime\

This will tell QuickTime to store preferences in the roaming profile and thus any changes will be captured by the sequencer.

Copy the preferences file at runtime

If you would prefer to leave the preferences file in it’s default location, you will have to copy a pre-configured preferences file at launch.

Create the QuickTime preferences by first installing QuickTime onto a test machine, configuring the required preferences, then copy the preferences file to a folder under the asset folder. Then modify the OSD file to copy the configured preferences file when QuickTime is launched:

<script event="LAUNCH" wait="TRUE" protect="TRUE" timing="PRE">
<SCRIPTBODY>@XCOPY /E /I /Q Q:\QTIME7.001\Prefs "%USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime"</SCRIPTBODY>
</script>

If you’re using Windows Vista or above change the path slightly:

<script event="LAUNCH" wait="TRUE" protect="TRUE" timing="PRE">
<SCRIPTBODY>@XCOPY /E /I /Q Q:\QTIME7.001\Prefs "%LOCALAPPDATA%\Apple Computer\QuickTime"</SCRIPTBODY>
</script> 

To support current and previous operating systems in the same package you could use this script instead:

<script event="LAUNCH" wait="TRUE" protect="TRUE" timing="PRE">
<SCRIPTBODY>IF EXIST "%LOCALAPPDATA%" (@XCOPY /E /I /Q Q:\QTIME7.001\Prefs "%LOCALAPPDATA%\Apple Computer\QuickTime") ELSE @XCOPY /E /I /Q Q:\QTIME7.001\Prefs "%USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime"</SCRIPTBODY>
</script>

3rd party user environment management tools such as AppSense Environment Manager or RES PowerFuse can do these actions on demand, so you could avoid scripting and copy the files when QuickTimePlayer.exe launches.

Include local AppData for capturing preferences when sequencing

If you want to leave the preferences in their default locations, then before virtualising remove these default preferences from the project:

  • %CSIDL_LOCAL_APPDATA%
  • %CSIDL_PROFILE%\Local Settings

Then add back the QuickTime cache folder as an exclusion:

  • %CSIDL_LOCAL_APPDATA%\Apple Computer\QuickTime\downloads

This will capture the preferences and ensure the QuickTime cache folder is not captured in the user’s virtualised profile (the .PKG file).

Virtualising the QuickTime package

You may additionally like to add %CSIDL_WINDOWS%\Installer as an exclusion to reduce the size of the final package, as a copy of the QuickTime setup files are stored there.

Capturing QuickTime should be straight-forward; however you will most likely need to create separate packages if you support multiple operating systems. Sequence on the lowest common denominator and test to see if this is required.

You will also need to create a shortcut to Internet Explorer (or your browser of choice) so that users can use QuickTime to view media on the web – just as you would when virtualising any other ActiveX controls.

{ 1 trackback }

{ 14 comments }

1 Marc Fearby February 6, 2008 at 2:28 am

Thanks for the recipe. I’m “cooking” it now and made the registry changes during the first monitoring phase, and now that I’m monitoring the first-run of QuickTime, I noticed that QuickTime still saved the settings file to “%USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime\QuickTime.qtp”, and now when I check the registry to see if I might have stuffed up, there are no “HKLM\Software\Apple Computer, Inc.” or “HKCU\Software\Apple Computer, Inc.” keys at all.

When monitoring during the second phase, is QuickTime actually being virtualised at that point and could this be why those keys aren’t visible (to me) at that point? Or does QuickTime actually delete those keys for some really handy reason known only to those wonderful software developers at Apple?

This application virtualisation caper is fast turning into a complete pain in the you-know-what.

2 Aaron Parker February 6, 2008 at 5:18 pm

Hi Marc, give the second option a go, where you copy the QuickTime.qtp file into the profile at launch.

3 JC March 14, 2008 at 9:59 pm

I tried using this recipe and everything seemed to work just fine except copying over QuickTime.qtp during pre-launch. I have the .qtp file in a folder called prefs under the asset folder (I am assuming when we are talking asset folder it is the folder where the sprj file is saved to or the install folder that was used on teh sequencer…I went ahead and put the Prefs folder with the QuickTime.qtp file under it in both spots) and I put the script for it to do an xcopy (see below) in my osd file but it still does not copy the file. I do see the cmd box appear and it disappears pretty quickly but I do see the word prefs so I know it is running something to do with the prefs. I did a search on the target machine to see if it was possibly copying the file to the wrong directory and there is no other quicktime.qtp file besides in the %USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime\ directory. Any thoughts?

@XCOPY /E /I /Q Q:\Quick_Time7.v01\Prefs “%USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime”

4 JC March 14, 2008 at 10:01 pm

Looks like it cutoff part of my Script statement…lets try again.

@XCOPY /E /I /Q Q:\Quick_Time7.v01\Prefs “%USERPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime”

5 JC March 14, 2008 at 10:02 pm

Not sure why it is cutting it off but basically it is under the dependency area and it is just under the Client Version section. The script lines look identical to your lines above except my SG virtual drive letter and folder is Q:\Quick_Time7.v01\Prefs.

Thanks in advance.

6 Aaron Parker March 15, 2008 at 9:13 am

Hi JC, drop me a line through my contact page so you can send me a copy of your OSD file and I might be able to see whats happening.

What does stand out there, but not the cause, is that your asset folder (Q:\Quick_Time7.v01) is more than 11 characters long. You should really be sticking to a 8.3 type folder name to avoid conflicts with other packages.

7 badshadd March 28, 2008 at 2:14 pm

I’ve been working with your great recipe that you developed with QuickTime 7.4.1.14 & I’ve had the same difficulties as JC stated in his comments. Did you identify what he had done wrong? I tried using @XCOPY, XCOPY & plain COPY in PRE LAUNCH, POST LAUNCH & POST SHUTDOWN scripts, but I’m still getting prompted at initial launch (only once) with the register file type associations dialog box which I believe overwrites the file I want to copy. The QTP file still doesn’t get overwritten after subsequent launches. If I manually copy the QTP file through my virtual IE link to the local system profile (while in the virtual enviroment on the client system), it works & still doesn’t get overwritten on subsequent launches. I don’t get it. Once again, these are beautifully written instructions, I’m just trying to put the icing on cake for delivering the preconfigured preferences to the end-user. ;^)

8 Aaron Parker March 28, 2008 at 3:54 pm

I’ve updated the post with because the original script to copy preferences would work only on XP/2003. I’ve added support for Vista/2008.

9 ucfchica1 April 30, 2008 at 5:14 pm

%ALLUSERSPROFILE%\Local Settings\Application Data\Apple Computer\QuickTime\ is not retaining my QT settings after changing my Registry entry to reflect the new location?

10 Aaron Parker April 30, 2008 at 6:02 pm

Is that folder virtualised in your package? If it is not, users won’t have write access to that location. I would recommend placing the settings file inside your package on the Q: drive.

11 peach August 18, 2010 at 2:32 pm

Sorry, but virtualisation is spelled with a Z – virtualization. You were using that word so many times I just had to tell :-)

12 Aaron Parker August 18, 2010 at 4:33 pm

In English it's spelt with an s, it's only American English where a z is used.

13 sose September 1, 2010 at 3:41 pm

I am having issues executing the script. I don't think the SOURCE variable is working. Is it simply a .bat you run from the location of the MSI files? Or do I specify that location?

14 Aaron Parker September 2, 2010 at 1:40 pm

Yes, the script should be in the folder as the source files. In some instances you may need to change the line
SET SOURCE=%SOURCE:~0,-2%
to
SET SOURCE=%SOURCE:~0,-1%
To see value of SOURCE, you can add ECHO %SOURCE% to the script. Otherwise just change those lines to point to where you source files are located.

Comments on this entry are closed.

Previous post:

Next post: