I recently needed to mass deploy iTunes across a network and lock down some of the features, and it turned out to be a little more complicated than a bunch of command line switches. It's not difficult, but there is little official documentation available so having completed the task here is a detailed methodology for anyone out there needing to do the same thing:
A. Preparation
1. First you are going to need Orca, which is included in the Windows Installer SDK. It's not installed by default, but once the SDK is installed you should be able to find orca.msi and install it. If you can't be bothered to go through all of that, I've uploaded a copy here.
2. Download the latest version of iTunes and save the installer into a folder that is accessible (read only) by all. I have a shared folder for all my group policy deployments so I'll just put it in there, in a \Apple\iTunes\Version sub-folder.
3. Extract the iTunes installer files using WinRAR and then delete the downloaded file, SetupAdmin.exe and AppleSoftwareUpdate.msi. The remaining five .msi files are required.
B. Transforming The Installers
AppleApplicationSupport.msi does not require any modification, so I'll just move on to the other four files:
QuickTime.msi
4. Start Orca and open QuickTime.msi. Go to View -> Summary Information and remove all languages except for 1033. Click OK and then save over the original.
5. Go to Transform -> New Transform, and then make the following modifications:
- LaunchCondition -> NOT BNEWERPRODUCTISINSTALLED: Right click and drop this row.
- Property -> SCHEDULE_ASUW: Set the value to 0 (zero).
- Registry: Find the item that has QTTask.exe in the Component column and drop that row.
- Shortcut: Drop rows for QuickTimePlayer_Desktop, QuickTimeUninstaller, and QuickTimeReadMe.
6. Generate the transform (.mst file), Transform -> Generate Transform, and save it as QuickTime.mst.
iTunes.msi
9. In Orca, open the iTunes.msi file, Go to View > Summary Information and remove all languages except for 1033. Click OK and then save over the original.
10. Go to Transform -> New Transform, and then make the following modifications:
- Component -> iTunesDesktopShortcuts: set the Condition so that it reads DESKTOP_SHORTCUTS="0" (zero).
- CustomAction -> QuickTimeInstallFailed: Drop this row.
- Property -> IAcceptLicense: Set the value to Yes.
- Property -> SCHEDULE_ASUW: 0 (zero).
- Shortcut: Drop the AboutiTunes row.
11. Generate the transform (.mst file), Transform -> Generate Transform, and save it as iTunes.mst.
Bonjour.msi
12. In Orca, open the Bonjour.msi file, Go to View -> Summary Information and remove all languages except for 1033. Click OK and then save over the original.
13. Go to Transform -> New Transform, and then make the following modifications:
- Property -> IAcceptLicense: Set Value to Yes.
- LaunchCondition -> NOT BNEWERPRODUCTISINSTALLED: Drop this row.
- Shortcut -> Drop all rows.
14. Generate the transform (.mst file), Transform -> Generate Transform, and save it as Bonjour.mst.
AppleMobileDeviceSupport.msi
15. In Orca, open the AppleMobileDeviceSupport.msi file, Go to View -> Summary Information and remove all languages except for 1033. Click OK and then save over the original.
16. Go to Transform -> New Transform, and then make the following modifications:
- Property -> IAcceptLicense: Set Value to Yes.
- LaunchCondition -> NOT BNEWERPRODUCTISINSTALLED: Drop this row.
17. Generate the transform (.mst file), Transform -> Generate Transform, and save it as AppleMobileDeviceSupport.mst.
18. Close Orca.
C. Group Policy Deployment (Active Directory)
Using the Group Policy Management tool, create a new Group Policy Object (GPO) and link it to the Organisational Unit that contains the target computers. In my case I only want iTunes to go to certain machines so I also filter the object by a security group of computers. You probably already have a structure for group policy deployment and I'm not going to cover that stuff here anyway, so I'll get straight to adding each installer to the GPO.
19. Edit the Group Policy Object and expand Computer Configuration -> Policies -> Software Settings -> Software Installation.
20. Right click and select New -> Package. Browse to your deployment share and select AppleApplicationSupport.msi. Leave 'assigned' selected as the deployment method and click OK to add it to the object.
21. Add another package but this time select QuickTime.msi. Select Advanced as the deployment method and click OK. After a few moments the Quicktime Properties panel will open. Go to the Modifications tab and select Add. Pick your QuickTime.mst file and press OK to finish.
22. Repeat step 21 for iTunes.msi, Bonjour.msi and AppleMobileDeviceSupport.msi, being sure to add the correct transform file for each package.
23. Reopen the iTunes package you created, and on the Deployment tab you can tick 'Uninstall this application when it falls out of scope of management'. This is just so that iTunes can easily be removed if necessary.
D. Locking Down Features & Parental Controls
Apple provides a mechanism for locking down various parts of the software, including automatically checking for updates, parental controls and a few other things. This is all managed through a single registry key.
I prefer to use Group Policy Preferences for this sort thing so I have created a single registry entry in the same GPO that I am using to deploy the software. The correct location for this entry in the GPO is under Computer Configuration -> Preferences -> Windows Settings -> Registry.
24. You can add the registry key however you like, but if you are using Group Policy Preferences then create a New Registry Item and fill in the properties box with the following values:
- Hive: HKEY_LOCAL_MACHINE
- Key Path: SOFTWARE\Apple Computer, Inc.\iTunes\Parental Controls\Default
- Value name: AdminFlags (do not tick Default)
- Value type: REG_DWORD
- Value data: Please see the next step to work out your particular value.
- Base: Decimal
Note. For a 64bit installation the key path needs to be: SOFTWARE\Wow6432Node\Apple Computer, Inc.\iTunes\Parental Controls\Default
25. The last thing we need to do is figure out that crucial registry key value. The table below shows all the options that are available to you. All you have to do is add together all the values for the ones you want and apply the total value:
| Item | Value |
| kParentalFlags_Locked | 1 |
| kParentalFlags_DisablePodcasts | 2 |
| kParentalFlags_DisableMusicStore | 4 |
| kParentalFlags_DisableSharing | 8 |
| kParentalFlags_DisableExplicitContent | 16 |
| kParentalFlags_DisableRadio | 32 |
| kParentalFlags_RestrictMovieContent | 64 |
| kParentalFlags_RestrictTVShowContent | 128 |
| kParentalFlags_DisableCheckForUpdates | 256 |
| kParentalFlags_RestrictGames | 512 |
| kParentalFlags_DisableMiniStore | 1024 |
| kParentalFlags_DisableAutomaticDeviceSync | 2048 |
| kParentalFlags_DisableGetAlbumArtwork | 4096 |
| kParentalFlags_DisablePlugins | 8192 |
| kParentalFlags_DisableOpenStream | 16384 |
| kParentalFlags_DisableAppleTV | 32768 |
| kParentalFlags_DisableDeviceRegistration | 65536 |
| kParentalFlags_DisableDiagnostics | 131072 |
| kParentalFlags_AllowITunesUAccess | 262144 |
| kParentalFlags_RequireEncryptedBackups | 524288 |
| kParentalFlags_DisableHomeSharing | 1048576 |
| kParentalFlags_DisableCheckForAppUpdates | 2097152 |
| kParentalFlags_DisableCheckForDeviceUpdates | 4194304 |
| kParentalFlags_DisablePing | 8388608 |
| kParentalFlags_DisableFirstRunWelcomeWindow | 16777216 |
I have including only the following controls:
- kParentalFlags_Locked: You must include this or users will be able to override your settings.
- kParentalFlags_DisableSharing
- kParentalFlags_DisableExplicitContent
- kParentalFlags_DisableHomeSharing
- kParentalFlags_DisableCheckForAppUpdates
- kParentalFlags_DisablePing
- kParentalFlags_DisableFirstRunWelcomeWindow
The value for my registry key is therefore 1 + 8 +16 + 1048576 + 2097152 + 8388608 + 16777216 = 28311577. The value you end up with will depend on your specific requirements.
All done!
E. Further Reference
http://developer.apple.com/library/ios/#featuredarticles/FA_Deploying_iTunes/Introduction/Introduction.html
http://support.apple.com/kb/HT2102
