How to tell if Office 2011 is installed

Posted by: Dominion Software Inc.

How to tell if Office 2011 is installed - 11/15/10 06:30 PM

Anyone have a robust way to check (via a shell script) if Office 2011 is installed?

Thanks,


Rick
Posted by: NucleusG4

Re: How to tell if Office 2011 is installed - 11/15/10 07:01 PM

I just open the app folder and look.
Sorry.
Posted by: yoyo52

Re: How to tell if Office 2011 is installed - 11/15/10 07:06 PM

Me too, Nuc. If there's a doubt, open one of the apps and see if it cooks. If it doesn't, it's not installed properly.
Posted by: the JoshMeister

Re: How to tell if Office 2011 is installed - 11/16/10 02:50 PM

Try this command in the Terminal:

Code:
test -d "/Applications/Microsoft Office 2011" && echo Yep || echo Nope

That will return "Yep" if the folder exists, and "Nope" if the folder doesn't exist. You can put something else in place of the echo commands, if you want.

This, of course, isn't foolproof. If a user moves the folder you'll get "Nope" even if the applications exist elsewhere on the computer. Similarly, if someone deletes all the applications from that folder, or if they just create an empty folder named "Microsoft Office 2011" inside the Applications folder, the command will return "Yep". These scenarios are unlikely but possible.

You're welcome. I accept PayPal donations. ;o)
Posted by: NucleusG4

Re: How to tell if Office 2011 is installed - 11/16/10 07:27 PM

JOSH!!!
Where ya been? You joined 3 years ago and now have 9 posts. Stop it dude.. yer killin me.

I'd say welcome aboard.. but you beat me to it...
Posted by: John Rougeux

Re: How to tell if Office 2011 is installed - 11/17/10 01:25 PM

That's not Josh. That's the JoshMeister, here to spin all the hits for you. laugh

I was surprised to see a registration date of 07 and 9 posts. this was the first one I have seen.
Posted by: NucleusG4

Re: How to tell if Office 2011 is installed - 11/18/10 03:58 AM

Ditto.

Hope he posts more often.
Posted by: MacBozo

Re: How to tell if Office 2011 is installed - 11/18/10 08:59 PM

Just wait for the "performed an illegal action" dialog. laugh
Posted by: padmavyuha

Re: How to tell if Office 2011 is installed - 11/21/10 03:00 AM

That's not version-specific enough grin.