Created
August 1, 2017 22:02
-
-
Save artynet/b147f8c978b772da07206919ceae68d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Microsoft Database Daemon" to quit | |
tell application "Microsoft AU Daemon" to quit | |
tell application "Office365Service" to quit | |
tell application "Finder" | |
try | |
delete file "Microsoft Communicator.app" of (path to applications folder) | |
end try | |
try | |
delete file "Microsoft Lync.app" of (path to applications folder) | |
end try | |
try | |
delete file "Microsoft Messenger.app" of (path to applications folder) | |
end try | |
try | |
delete folder "Microsoft Office 2011" of (path to applications folder) | |
end try | |
try | |
delete file "Remote Desktop Connection.app" of (path to applications folder) | |
end try | |
try | |
delete folder "Microsoft" of (path to application support folder) | |
end try | |
delete (every item of folder "Automator" of (path to library folder) ¬ | |
whose name contains "Excel") | |
delete (every item of folder "Automator" of (path to library folder) ¬ | |
whose name contains "Office") | |
delete (every item of folder "Automator" of (path to library folder) ¬ | |
whose name contains "Outlook") | |
delete (every item of folder "Automator" of (path to library folder) ¬ | |
whose name contains "PowerPoint") | |
delete (every item of folder "Automator" of (path to library folder) ¬ | |
whose name contains "Word") | |
delete (every item of folder "Automator" of (path to library folder) ¬ | |
whose name contains "Workbook") | |
try | |
delete file "Get Parent Presentations of Slides.action" of folder ¬ | |
"Automator" of (path to library folder) | |
end try | |
try | |
delete file "Set Document Settings.action" of folder ¬ | |
"Automator" of (path to library folder) | |
end try | |
try | |
delete folder "Microsoft" of (path to fonts folder from local domain) | |
end try | |
try | |
move file "Arial Bold Italic.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Arial Bold.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Arial Italic.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Arial.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Brush Script.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Times New Roman Bold Italic.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Times New Roman Bold.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Times New Roman Italic.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Times New Roman.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Verdana Bold Italic.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Verdana Bold.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Verdana Italic.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Verdana.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Wingdings 2.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Wingdings 3.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
try | |
move file "Wingdings.ttf" of folder "Fonts Disabled" of (path to library folder) to (path to fonts folder from local domain) | |
end try | |
delete (every item of folder "Internet Plug-Ins" of (path to library folder) ¬ | |
whose name contains "SharePoint") | |
delete (every item of folder "LaunchDaemons" of (path to library folder) ¬ | |
whose name contains "com.microsoft.office.licensing.helper.plist") | |
delete (every item of folder "Preferences" of (path to library folder) ¬ | |
whose name contains "com.microsoft.office.licensing.plist") | |
delete (every item of folder "PrivilegedHelperTools" of (path to library folder) ¬ | |
whose name contains "com.microsoft.office.licensing.helper") | |
end tell | |
set receiptsList to do shell script "pkgutil --pkgs=com.microsoft.office.*" | |
repeat with receiptNumber from 1 to count of paragraphs in receiptsList | |
set forget to "pkgutil --forget " & paragraph receiptNumber of receiptsList as string | |
do shell script forget with administrator privileges | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment