信息
Parallels Management Suite 的软件分发功能可用于安装、升级或卸载 Mac OS X 中的 Microsoft Office。要了解有关使用软件分发功能的全部说明,请查看 Parallels Management Suite for Microsoft SCCM 2007 或 Parallels Management Suite for Microsoft SCCM 2012 管理员指南中的软件分发部分。
要在 Mac OS X 中安装或升级 Microsoft Office:
1. 获取 Microsoft Office for Mac 2011 安装镜像文件并放置于可从 Configuration Manager 控制台进行访问的文件夹中。 当创建软件分发包时,需提供文件夹名称和路径作为 源文件夹 参数。 2. 指定 命令行 参数时,需使用以下行:
hdiutil mount -nobrowse Office_Mac_Standard_2011w_SP1_English.ISO && installer -package "/Volumes/Microsoft Office 2011/Office Installer.mpkg/" -target / && hdiutil unmount "/Volumes/Microsoft Office 2011/"
注意: “.dmg” 安装镜像的命令行类似于“.iso” 安装镜像的命令行。
要移除 Microsoft Office for Mac 2011 您需要移动所有 Microsoft Office for Mac 2011 文件夹和文件到废纸篓。 在以下 URL 地址中有对需要移除的文件和文件夹列表的描述信息:
https://technet.microsoft.com/en-US/library/jj984171(v=office.14).aspx。
以下脚本会移除 Microsoft Office for Mac 2011:
#!/bin/bash
rm -R "/Applications/Microsoft Office 2011/"
rm -R "/Applications/Remote Desktop Connection.app/"
rm -R "/Applications/Microsoft Communicator.app/"
rm -R "/Applications/Microsoft Messenger.app/"
rm -R "/Library/Automator/"
rm -R "/Library/Application Support/Microsoft/MAU2.0"
rm -R "/Library/Application Support/Microsoft/MERP2.0"
rm -R "/Library/Fonts/Microsoft/"
rm "/Library/Preferences/com.microsoft.office.licensing.plist"
rm "/Library/LaunchDaemons/com.microsoft.office.licensing.helper.plist"
rm "/Library/PrivilegedHelperTools/com.microsoft.office.licensing.helper"
IFS=":"
for shrpoint in $(ls "/Library/Internet Plug-Ins/" | grep SharePoint | tr "\n" ":" ); do
rm -R "/Library/Internet Plug-Ins/${shrpoint}"
done
for user in $(dscl . list /Users | grep -v _ | tr "\n" ":" ); do
[ -e "/Users/${user}" ] || continue
rm -R "/Users/${user}/Library/Preferences/Microsoft/Office 2011/"
rm -R "/Users/${user}/Library/Application Support/Microsoft/"
rm -R "/Users/${user}/Documents/Microsoft User Data/"
done
version=$(sw_vers -productVersion)
ver1=$(echo $version | cut -d "." -f -1)
ver1end=$(echo $version | cut -d "." -f 2-)
if [[ $ver1 -eq 10 ]]; then
ver2=$(echo $ver1end | cut -d "." -f -1)
if [[ $ver2 -ge 6 ]]; then
for rcpts in $(ls "/var/db/receipts/" | grep com.microsoft.office | tr "\n" ":" ); do
rm -r "/var/db/receipts/${rcpts}"
done
else
for rpcts in $(ls "/Library/Receipts/" | grep Office | tr "\n" ":" ); do
rm -r "/Library/Receipts/${rcpts}"
done
fi
fi
unset IFS
保存以上脚本为带有 “.sh” 扩展名的文件(例如 myscript.sh)到可从 Configuration Manager 控制台访问的文件夹中。 当创建软件分发包时,请使用文件夹的名称和路径作为 源文件夹 参数并使用以下命令作为 命令行 参数:
sh myscript.sh
Was this article helpful?
Tell us how we can improve it.