Friday, October 24, 2014

Quick and Dirty iTunes/Quicktime Bundle Script using SCCM

Unfortunately, iTunes doesn't like being installed outright.

There are a few happy ways to get it to install. 

For this quick and dirty method, download iTunes or iTunes64, depending on your deployment, and Quicktime. If you're using a Mac to manage this mess, like me, be sure to download the Windows versions. 12.0.1 is current as of this tutorial.

Once downloaded, extract the contents of the .exe files using 7zip or Keka (Mac)


You'll find four .msi files in the QuickTimeInstaller folder, and six in each iTunesSetup folder. Copy QuickTime.msi to both iTunesSetup folders, and dump all the other QuickTime files.

Rename iTunesSetup to 12.0.1 and 12.0.1_64bit, for easy recognition, and delete SetupAdmin.exe.  These will function as the version folders you put in your iTunes folder on your application server or distribution point. 

This is the install.cmd script for 32-bit iTunes in 32-bit Windows 7.

This install.cmd is for 64-bit iTunes in 64-bit Windows 7.


Put the install.cmd in the same folder as the .msi files. This will be the SCCM executable.

Notice the Desktop Shortcut variable in the QuickTime installation? This code is reused for earlier versions of QuickTime, some of which actually respond; the if exist statement is only a fallback.

Always use the exit code snippet to the end of any batch script; SCCM may not be sensitive to the orphaning of a script, and an orphaned default installation will run 120 minutes before forcing detection. 

These scripts are likely to work for future versions of iTunes (QuickTime has stayed at 7.5.5 for a long time), and have worked without any editing since version 11 of iTunes, as the .exe files extract to .msi files of the same names. 

In order to make this script deployable, use the Manual Script Application Installer Method.


I've since evolved this process so that installers are individually deployed, and post configuration is done via batch script, which then calls the individual installers as dependencies. The process is a bit more involved, but also cleaner. 

Manual Script Application Installer Method

Unfortunately, SCCM is unable to automatically detect and configure an application installer for every installation. SCCM isn't necessarily very good at doing this with an MSI. For this reason, most installations, outside of the absolute most common, are customized or batch scripted. Batch scripting requires manual deployment.

Create a new application package. Manually configure.

Fill in the application information.

If you have only ever deployed MSI, this will be new to you. Add...

If you have an MSI that is part of your package, leave the Type as Windows Installer, and Browse..., if you do not, change the type to Script and skip the next step.

*Select an MSI and click next. Copy the {PRODUCT-CODE}, then click back to the beginning of this wizard.

Change the Type to Script, and click next.

Name your deployment, I add Script to the name of all batch deployments, and put (.cmd) at the end.

If you've selected an MSI that was part of the deployment package, you may just need to select the Installation Program, which I always name "install.cmd". The uninstall program will only uninstall the selected MSI, so it doesn't really matter here, anyway. If you have not selected an MSI, select the package folder and the installation program now, and click Next.

This is where the MSI makes a difference. If you've selected an MSI before going back, the setting type should be set to Windows Installer, and the product code should be filled in. If not, you've also copied the product code. Select Windows Installer and paste the product code here. If you did not have an MSI in your package, install the program on your reference computer, and detect either the uninstaller (registry) or a file in the installed folder. Click OK.

It's pretty satisfying to have a product code for detection, but be sure it's a part of the installation, or you'll end up with deployment errors. I'll be working on a tutorial for detection. Click Next.

Set experience as necessary. Next until finished.

I've used this for lots of quick installation configurations early on, but I use it mostly to script post installation configurations that keep users from having to do anything but use programs as intended.