Allowing Users to install Mendeley's Word Plugin

Allowing Users to install Mendeley's Word Plugin

2014, Apr 16    

A lot of our faculty and staff use the Mendeley application which also has a Microsoft Word Plugin that can be installed with Mendeley. The issue however is that Mendeley's Word Plugin must write files to the following places:

/Applications/Microsoft Office 2011/Office/Startup/Word/ - Mendeley.dot file
~/Library/Application Support/Microsoft/Office/Word Script Menu Items/ - Mendeley Apple Scripts (Accessible from the Menu)

Since the plugin install installs files to each user's folder, it is not a good idea to automate the install via Munki by copying the Mendeley.dot file because even if the file is listed Mendeley will detect it as an older version and then prompt for admin credentials to install the new file. To remedy this issue when Mendeley is installed I grant write permissions for all users to the folder /Applications/Microsoft Office 2011/Office/Startup/Word to copy the Mendely.dot file.  This allows the users to install the Microsoft Word plugin for Mendeley without the need for administrative intervention.

Listed below is the script I have created for Munki that will apply this permission upon install to fully automate the process. I have also created an uninstall script that will revert the permissions when Mendeley is no longer installed. As always, if you have any questions feel free to leave a comment or suggestion.

Post Install Script

1
2
3
4
5
#!/bin/bash
# Mircosoft Word 2011 Plugin for Mendeley
# Last Updated April 10, 2014 - Joshua D. Miller
# Set Permissions to allow the Mendeley Word Plugin to Install
[ -e /Applications/Microsoft\ Office\ 2011/ ] && chmod o+w /Applications/Microsoft\ Office\ 2011/Office/Startup/Word

Uninstall Script

1
2
3
4
5
6
7
#!/bin/bash
# Uninstall Script for Word Plugin for Mendeley
# Last Updated April 10, 2014 - Joshua D. Miller
# Remove the Mendeley Template file
[ -e /Applications/Microsoft\ Office\ 2011/Office/Word/Startup/Mendeley.dot ] && rm /Applications/Microsoft\ Office\ 2011/Office/Startup/Word/Mendeley.dot
# Restore Permissions on the folder /Applications/Microsoft Office 2011/Office/Startup/Word/
[ -e /Applications/Microsoft\ Office\ 2011/ ] && chmod o-w /Applications/Microsoft\ Office\ 2011/Office/Startup/Word