Tiny Deathstars of Foulness

One of the easiest things to do in OS X is to remotely run an installation package using the installer command. You can do some similar tasks in Windows, although the commands aren’t quite as cut and dry. The Start-Process command can be used to kick off an executable. Here, we will kick off the msiexec.exe and feed it an argument, which is the msi file to install silently. We’ll then wait for it to complete:

{Start-Process -FilePath "msiexec.exe" -ArgumentList "/i TEST.msi /qb" -Wait -Passthru}

August 19th, 2015

Posted In: Windows Server, Windows XP

Tags: , , , , ,

When installing a package OS X makes a list of what it installs in /Library/Receipts/InstallHistory.plist. The dictionaries show each package installed, along with the installation date, the name displayed during installation, the version of the package being installed, the identifier of the package and the process name used to install the package. This information, along with the file name of the actual package is stored in corresponding property lists in /private/var/db/receipts. Each bill of material is also stored there, in .bom file.

The lsbom command is used to see a list of objects installed by the package. You can also see the options such as the permissions assigned to files by the package as they’re installed. For example, that Twitter app from the app store; to see what it installs:

lsbom /private/var/db/receipts/

This package is installed by the Mac App Store. When run, packages installed by the Mac App Store should only contain objects within that applications .app bundle. That’s a pretty good bit of information, so you can also use the -s option to constrain the output to only see the paths of files (relative paths, of course). I’m usually a fan of getting more information than less, so I usually run it adding the -m option, which shows me those permissions.

lsbom /private/var/db/receipts/

Note: You can also use the mkbom command to create new .bom files. As the man page for bom indicates, this goes back to NeXTSTEP and was extended for 10.0 and again in 10.3.

May 18th, 2013

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , ,

One of the challenges that we face when building a large Xsan for video environments where we also need to deploy Final Cut is to install Final Cut Pro or Final Cut Studio on all the clients. It can mean a lot of switching out of optical media and kill productivity if you aren’t careful. This is why we started looking to the Xsan to provide some of the speed to the installation process that it will later provide to the clients.

First off, extract the installers or create an image of the disk(s). If you extract the disk then you will need to mount it and then start the installer package, which can be done programmatically (assuming a disk image called FCInstaller.dmg located on an Xsan volume called simply SAN):
hdid /Volumes/SAN/FCInstaller.dmg
installer -verbose -pkg /Volumes/Final Cut Studio Install/Installer/FinalCutStudio.mpkg -target /Volumes/Final Cut Studio 3

Once installed, don’t forget to clean up after yourself by unmounting the drive. This can also be done programatically using the hdiutil command with the detatch option. You can use df or another tool to obtain the device and then unmount based on that device. For example, if df showed a device of /dev/disk3s2 for your installer disk image, then the following would unmount the disk image:
hdiutil detach /dev/disk3s2

If you have multiple disk images then each will need to be mounted and unmounted separately. You can also mount them all manually by simply double-clicking on the dmg files. Performing the installation over point-and-click or programmatically can then be done on a number of Xsan clients concurrently. It provides a means of deploying Final Cut over fibre channel and beats the pants off the previous means of installation, which was mostly to either do optical media, ethernet or over firewire drives moved between stations via sneakernet. This type of deployment will also free up the Ethernet network for any other installers or processes that you are working on at the time.

Also, as you get deployment packages and scripts built, you can host those on the Xsan as well. This allows for fast deployment of any suite. Anyway, hope it saves you a little time…

January 11th, 2010

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment, Xsan

Tags: , , , , ,

A metapackage is a set of packages distributed in one structure.  Each can have its own dependencies (including whether another package has successfully installed) and you can control which order packages run in.

March 5th, 2008

Posted In: Mac OS X, Mass Deployment

Tags: , , ,

To use the command line to install a package, use the following command:

installer -pkg ./<package name> -target/

July 14th, 2007

Posted In: Mac OS X, Mac OS X Server

Tags: , , , ,

When packaging it is worth note that Apple reserves some positional paremeters for your scripts. These are defined at

They include:

  • $1: Path to the package
  • $2: Path to the destination.
  • $3: Installation volume.
  • $4: Root directory

August 6th, 2006

Posted In: Mac OS X, Mac OS X Server, Mass Deployment

Tags: , , , , , ,