BigOncleSam

OSX_MSOffice_Splash_remover.sh

Jul 23rd, 2018
442
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.60 KB | None | 0 0
  1. #!/bin/bash
  2. # Office 2016 for Mac presents "first run" dialogs to the user to market some of its new features.
  3. # This script will suppress these "first run" dialogs using the following settings:
  4. #
  5. # Setting: kSubUIAppCompletedFirstRunSetup1507 – boolean value (true / false)
  6. # Function: Suppresses the "What’s New" dialog for Office 2016 applications' first launch
  7. #
  8. # Setting: FirstRunExperienceCompletedO15 – boolean value (true / false)
  9. # Function: Suppresses additional "What’s New" dialog for Outlook and OneNote.
  10. # Note: That is a capital letter O in "O15", not zero15.
  11. #
  12. # Setting: SendAllTelemetryEnabled – boolean value (true / false)
  13. # Function: Suppresses the offer to send crash reports to Microsoft
  14. #
  15. # Source for settings:
  16. # http://macops.ca/disabling-first-run-dialogs-in-office-2016-for-mac/
  17. # Set whether you want to send diagnostic info back to Microsoft. If you want to
  18. # offer the choice of sending diagonostic data back to Microsoft, set the following
  19. # value for the submit_diagnostic_data_to_microsoft variable:
  20. #
  21. # submit_diagnostic_data_to_microsoft=true
  22. #
  23. # By default, the values in this script are set to send no diagnostic data to Microsoft:
  24. submit_diagnostic_data_to_microsoft=false
  25.  
  26. DisableOffice2016FirstRun(){
  27.  
  28.    # This function will disable the first run dialog windows for all Office 2016 apps.
  29.    # It will also set the desired diagnostic info settings for Office application.
  30.    /usr/bin/defaults write /Library/Preferences/com.microsoft."$app" kSubUIAppCompletedFirstRunSetup1507 -bool true
  31.    /usr/bin/defaults write /Library/Preferences/com.microsoft."$app" SendAllTelemetryEnabled -bool "$submit_diagnostic_data_to_microsoft"
  32.  
  33.    # Outlook and OneNote require one additional first run setting to be disabled
  34.    if [[ $app == "Outlook" ]] || [[ $app == "onenote.mac" ]]; then
  35.      /usr/bin/defaults write /Library/Preferences/com.microsoft."$app" FirstRunExperienceCompletedO15 -bool true
  36.    fi
  37. }
  38.  
  39. # Run the DisableOffice2016FirstRun function for each detected Office 2016
  40. # application to disable the first run dialogs for that Office 2016 application.
  41.  
  42. if [[ -e "/Applications/Microsoft Excel.app" ]]; then
  43. app=Excel
  44. DisableOffice2016FirstRun
  45. fi
  46.  
  47. if [[ -e "/Applications/Microsoft OneNote.app" ]]; then
  48. app=onenote.mac
  49. DisableOffice2016FirstRun
  50. fi
  51.  
  52. if [[ -e "/Applications/Microsoft Outlook.app" ]]; then
  53. app=Outlook
  54. DisableOffice2016FirstRun
  55. fi
  56.  
  57. if [[ -e "/Applications/Microsoft PowerPoint.app" ]]; then
  58. app=Powerpoint
  59. DisableOffice2016FirstRun
  60. fi
  61.  
  62. if [[ -e "/Applications/Microsoft Word.app" ]]; then
  63. app=Word
  64. DisableOffice2016FirstRun
  65. fi
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment