Silent Managed Installation of Office 2011 for Mac and first removing Office 2008 (plus Outlook 2011)

I've been googling and searching itninja all day and not getting the info I need, so I'm putting out this question in the hopes of a KBOX Mac deployment veteran helping me (I consider myself something of a KBOX Windows deployment veteran in that I've got it to install quite a few things with quite a bit of custom code).

Unfortunately, I know very little on Macs (I'm purchasing and downloading books on Mac and Bash right after I post this and complete the other 100 things to do today), for example, I see "scripts" mentioned a lot, sometimes even with examples, unfortunately I have no idea HOW to USE those scripts, for example, if I see a Windows command line script for use with kbox, I know to stick it in a .bat file and just specify it's name (or use "call nameoffile.bat" without quotes unless there's a space in the name), I know's yet know the Mac equivalent, I hear "bash" mentioned, is that the Mac language equivalent?

I've got the VL Mac 2011 install, I'm setup a manage install (I had to make a "guess" one, since this is the first install so it's not listed in KBOX, in fact.. looking at the 2008 install, I'm worried there won't be a "Office" one, and just the individual components.

The problem I also have is most of these Macs have Office 2008 with Outlook 2011 on... don't know how they got them, but regardless I want to just end up with Office 2011, so I probably need to run a script to remove them first?

So far, I've discovered that 10622 isn't unzipping, so I understand you have to do sudo unzip ./filename.zip && rest of your commands (which I thought would be installer -pkg "Office Installer.pkg" -target / but maybe I need the equivalent of call setup.bat for Mac and add this line into, and do the removal stuff before?

On the Windows side, I basically always set it to configure manually, then I create a setup.bat and put it in the zip with the files, inside this bat I can do all the things I need to, call .msi files copy config files, delete shortcuts, add shortcuts, all kinds of things, as well as install.

How do I do the same for Mac basically?

0 Comments   [ + ] Show comments

Answers (1)

Posted by: chucksteel 8 years ago
Red Belt

You are on the right track. You are correct that the Mac client won't first unzip the archive so your install command has to include that first. Here is my install command for Microsoft Office 2011:

unzip "Office Installer.zip"; installer -pkg "Office Installer.pkg" -target /

I wasn't worried about removing Office 2008 first so I didn't need a script, but if you do need a script then you could put everything in script.sh and then call that script instead. For instance, we use Druva InSync as our backup solution and here's the install command in KACE:

tar -zxvf druvamacinstall5_2_2.tar.gz && install.sh

Typically a shell script on Mac can use either the bash shell or the sh shell and there can be a header on the first line indicating which shell to use but in my experience scripts run through KACE do not require it. Also, the managed install runs in the system context so there is no need to sudo the commands.



  • Thanks chucksteel, good to know I'm in the right area. I've made a install.sh which should remove the old versions, install the new one and then (just for good measure) run a kbox inventory, I've set Managed Install to "Configure Manually" and put in:
    tar -zxvf office_mac_standard_2011w_sp2.tar.gz && install.sh > setup.log

    I can see it download the file, it extracts it, and it creates a setup.log file, but the log file is empty and nothing appears to happen on the Mac.

    Contents of my install.sh written in Notepad++ on Windows and saved and included in the tar.gz file (it's extracted ok along with "Office Installer.pkg"

    # install.sh
    # Uninstall Previous Versions
    rm -rf "/Applications/Microsoft Office 2008"
    rm -rf "/Applications/Microsoft Office 2011"
    # Install Software
    installer -pkg "Office Installer.pkg" -target /
    # Run Inventory
    /Library/Application\ Support/Dell/KACE/bin/runkbot 2 0
    # End - AJStevens 8 years ago
    • I'd open the install.sh file in terminal using something like pico to see if the line endings are correct. Sometimes saving shell scripts on Windows messes that up. You might also want to try and run the install.sh script manually after KACE extracts it to see what happens. - chucksteel 8 years ago
      • I've amended the end of my MI command line to && install.sh > setup.log 2>&1 and now I've actually got something in the setup.log file

        sh: /Library/Application Support/Dell/KACE/data/downloads/25284/install.sh: /bin/sh^M: bad interpreter: No such file or directory

        Could be what you said about line ending or the format of the script? I really don't want to have to write and update this script solely on a Mac, is there anyway to do it on Windows? I figured Notepad++ would be alright (obviously not using notepad or MS Word! LOL).

        PS. Once I've got this script working, I'd like it to delete all these files in the current directory so as not to leave the install on the Mac for them to find and copy off.

        Also, do I need to worry about the "Dock" ? Removing any current 2008 icons, and adding 2011 ones? Some of them could be like "you removed my office! I've called the helpdesk, panic, panic, panic" (or maybe I'm tarring them with the Windows user brush, but I'm a pessimist and it's worked for me so far). - AJStevens 8 years ago
      • Yes, the ^M is probably causing the problem. I use pico in Terminal, it's a basic text editor. I'm not hardcore enough to use vi or emacs.

        We actually made the decision to leave 2008 on machines because of the dock issue. Since the dock is a user preference it's difficult to make the changes for all users. There are ways to script the changes but you would have to make that script run at login for every user. In the end we decided to push out 2011 and as techs visited computers we made the changes to the dock. For lab systems we changed the default user profile and we have now moved to managing more system settings with Workgroup Manager (now called Profiles in 10.8) so we can place items on the dock for users.

        To remove the files once the install is complete check the box in the managed install to delete downloaded files. If you don't trust that then your script should be able to delete the package and the archive, too. - chucksteel 8 years ago
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ