diff --git a/Installomator.sh b/Installomator.sh index 34bdba1..dbe3bfc 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -6,8 +6,9 @@ # 2020 Armin Briegel - Scripting OS X # # inspired by the download scripts from William Smith and Sander Schram +# with additional ideas and contribution from Isaac Ordonez, Mann consulting -VERSION='20200325' +VERSION='20200429' export PATH=/usr/bin:/bin:/usr/sbin:/sbin @@ -154,7 +155,7 @@ case $identifier in expectedTeamID="EQHXZ8M8AV" ;; googlechromepkg) - name="GoogleChrome" + name="Google Chrome" type="pkg" downloadURL="https://dl.google.com/chrome/mac/stable/gcem/GoogleChrome.pkg" expectedTeamID="EQHXZ8M8AV" @@ -276,9 +277,9 @@ case $identifier in downloadURL="https://go.microsoft.com/fwlink/?linkid=525133" expectedTeamID="UBF8T346G9" blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft OneDrive" ) - ;; updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" updateToolArguments=( --install ) + ;; microsoftofficebusinesspro) name="MicrosoftOfficeBusinessPro" type="pkg" @@ -309,12 +310,16 @@ case $identifier in type="pkg" downloadURL="https://go.microsoft.com/fwlink/?linkid=832978" expectedTeamID="UBF8T346G9" + updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" + updateToolArguments=( --install --apps MSFB16 ) ;; microsoftremotedesktop) name="Microsoft Remote Desktop" type="pkg" downloadURL="https://go.microsoft.com/fwlink/?linkid=868963" expectedTeamID="UBF8T346G9" + updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" + updateToolArguments=( --install --apps MSRD10 ) ;; microsoftteams) name="Microsoft Teams" @@ -330,12 +335,16 @@ case $identifier in type="pkg" downloadURL="https://go.microsoft.com/fwlink/?linkid=830196" teamID="UBF8T346G9" + updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" + updateToolArguments=( --install --apps MSau04 ) ;; microsoftedgeenterprisestable) name="Microsoft Edge" type="pkg" downloadURL="https://go.microsoft.com/fwlink/?linkid=2093438" teamID="UBF8T346G9" + updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" + updateToolArguments=( --install --apps EDGE01 ) ;; microsoftword) name="Microsoft Word" @@ -360,37 +369,22 @@ case $identifier in appName="Visual Studio Code.app" blockingProcesses=( Electron ) ;; + microsoftdefenderatp) + name="Microsoft Defender ATP" + type="pkg" + downloadURL="https://go.microsoft.com/fwlink/?linkid=2097502" + expectedTeamID="UBF8T346G9" + updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" + updateToolArguments=( --install --apps WDAV00 ) + ;; - # note: there are more available MS downloads to add - # 525133 - Office 2019 for Mac SKUless download (aka Office 365) - # 2009112 - Office 2019 for Mac BusinessPro SKUless download (aka Office 365 with Teams) - # 871743 - Office 2016 for Mac SKUless download - # 830196 - AutoUpdate download - # 2069148 - Edge (Consumer Stable) - # 2069439 - Edge (Consumer Beta) - # 2069340 - Edge (Consumer Dev) - # 2069147 - Edge (Consumer Canary) - # 2093438 - Edge (Enterprise Stable) - # 2093294 - Edge (Enterprise Beta) - # 2093292 - Edge (Enterprise Dev) - # 525135 - Excel 2019 SKUless download - # 871750 - Excel 2016 SKUless download - # 869655 - InTune Company Portal download - # 823060 - OneDrive download - # 820886 - OneNote download - # 525137 - Outlook 2019 SKUless download - # 871753 - Outlook 2016 SKUless download - # 525136 - PowerPoint 2019 SKUless download - # 871751 - PowerPoint 2016 SKUless download - # 868963 - Remote Desktop - # 800050 - SharePoint Plugin download - # 832978 - Skype for Business download - # 869428 - Teams - # 525134 - Word 2019 SKUless download - # 871748 - Word 2016 SKUless download + # msupdate codes from: + # https://docs.microsoft.com/en-us/deployoffice/mac/update-office-for-mac-using-msupdate - - # these description exist for testing and are intentionally broken + # download link IDs from: https://macadmin.software + + + # these descriptions exist for testing and are intentionally broken brokendownloadurl) name="Google Chrome" type="dmg" @@ -622,8 +616,10 @@ runUpdateTool() { cleanupAndExit 15 "Error running $updateTool" fi else - cleanupAndExit 16 "couldn't find $updateTool" + echo "couldn't find $updateTool, continuing normally" + return 1 fi + return 0 } @@ -705,11 +701,12 @@ if [[ $(mdfind -count "kMDItemFSName == '$appName' && kMDItemKind == 'Applicatio appversion=$(mdls -name kMDItemVersion -raw $installedAppPath ) echo "found app at $installedAppPath, version $appversion" if [[ $DEBUG == 0 ]]; then - runUpdateTool + if runUpdateTool; then + cleanupAndExit 0 + fi # otherwise continue else echo "DEBUG mode enabled, not running update tool" fi - cleanupAndExit 0 else echo "could not determine location of $appName" fi