Skip to main content
Question

Office 2016 using dockutil

  • August 11, 2015
  • 3 replies
  • 14 views

bpavlov
Forum|alt.badge.img+18
  • Esteemed Contributor
  • 1206 replies

Not sure if they did this in 2011. Just thought this was interesting:

Do a pkgutil --expand /path/to/Office2016installer.pkg /new/path/to/extract/to

  1. Right-click on the path you've extracted the installer to.
  2. Right-click "Office15_all_licensing.pkg" and "Show package contents"
  3. Go to the scripts folder and you will see dockutil and of course the postinstall script that calls it.

3 replies

Forum|alt.badge.img+13
  • Valued Contributor
  • 291 replies
  • August 19, 2015

I saw that too. They simplified the hell out of their install scripts.

Most of the stuff doesn't do anything but check for valid OS versions and then the licensing model.

Have you noticed an inconsistencies when using dockutil during postinstall scripts? Sometimes it adds everything, other times it adds just a couple of the items. For instance, I used this code to remove existing office dock icons and re-add the 2016 version. Only Outlook was added.

killall cfprefsd
/usr/bin/dockutil --remove 'Microsoft Excel' --allhomes --no-restart
/usr/bin/dockutil --remove 'Microsoft Outlook' --allhomes --no-restart
/usr/bin/dockutil --remove 'Microsoft PowerPoint' --allhomes --no-restart
/usr/bin/dockutil --remove 'Microsoft Word' --allhomes --no-restart

/usr/bin/dockutil --add /Applications/Microsoft Excel.app --allhomes --no-restart
/usr/bin/dockutil --add /Applications/Microsoft Outlook.app --allhomes --no-restart
/usr/bin/dockutil --add /Applications/Microsoft PowerPoint.app --allhomes --no-restart
/usr/bin/dockutil --add /Applications/Microsoft Word.app --allhomes --no-restart
killall Dock


Forum|alt.badge.img+13
  • Contributor
  • 400 replies
  • August 27, 2015

Please put a delay in between command and see:
e.g.-

/usr/bin/dockutil --add /Applications/Microsoft Excel.app --allhomes --no-restart
/bin/sleep 5
/usr/bin/dockutil --add /Applications/Microsoft Outlook.app --allhomes --no-restart
/bin/sleep 5
/usr/bin/dockutil --add /Applications/Microsoft PowerPoint.app --allhomes --no-restart
/bin/sleep 5
/usr/bin/dockutil --add /Applications/Microsoft Word.app --allhomes --no-restart
/bin/sleep 5
killall Dock

Forum|alt.badge.img+13
  • Valued Contributor
  • 291 replies
  • September 18, 2015

That delay is key and I'm surprised I see so many others not adding it to the script. Without that delay not all of the icons get added to the dock. Seems terribly sporadic.