Skip to content

Commit

Permalink
v2.4
Browse files Browse the repository at this point in the history
Fixed -chk.xml persistence issue
Added support for MSau04
  • Loading branch information
pbowden-msft committed Feb 26, 2019
1 parent d9a81dc commit e4c27bd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 39 deletions.
74 changes: 40 additions & 34 deletions MAUCacheAdmin
Expand Up @@ -2,7 +2,7 @@
#set -x

TOOL_NAME="Microsoft AutoUpdate Cache Admin"
TOOL_VERSION="2.3"
TOOL_VERSION="2.4"

## Copyright (c) 2019 Microsoft Corp. All rights reserved.
## Scripts are not supported under any Microsoft standard support program or service. The scripts are provided AS IS without warranty of any kind.
Expand All @@ -16,6 +16,7 @@ TOOL_VERSION="2.3"

# Constants
MAUID_MAU3X="0409MSau03"
MAUID_MAU4X="0409MSau04"
MAUID_WORD2019="0409MSWD2019"
MAUID_EXCEL2019="0409XCEL2019"
MAUID_POWERPOINT2019="0409PPT32019"
Expand Down Expand Up @@ -94,41 +95,43 @@ ResolveDownloadUrl () {
BuildApplicationArray () {
# Builds an array of all the MAU-enabled applications that we care about
MAUAPP[0]="$MAUID_MAU3X"
MAUAPP[1]="$MAUID_WORD2019"
MAUAPP[2]="$MAUID_EXCEL2019"
MAUAPP[3]="$MAUID_POWERPOINT2019"
MAUAPP[4]="$MAUID_OUTLOOK2019"
MAUAPP[5]="$MAUID_ONENOTE2019"
MAUAPP[6]="$MAUID_WORD2016"
MAUAPP[7]="$MAUID_EXCEL2016"
MAUAPP[8]="$MAUID_POWERPOINT2016"
MAUAPP[9]="$MAUID_OUTLOOK2016"
MAUAPP[10]="$MAUID_ONENOTE2016"
MAUAPP[11]="$MAUID_OFFICE2011"
MAUAPP[12]="$MAUID_LYNC2011"
MAUAPP[13]="$MAUID_SKYPE2016"
MAUAPP[14]="$MAUID_INTUNECP"
MAUAPP[15]="$MAUID_REMOTEDESKTOP10"
MAUAPP[1]="$MAUID_MAU4X"
MAUAPP[2]="$MAUID_WORD2019"
MAUAPP[3]="$MAUID_EXCEL2019"
MAUAPP[4]="$MAUID_POWERPOINT2019"
MAUAPP[5]="$MAUID_OUTLOOK2019"
MAUAPP[6]="$MAUID_ONENOTE2019"
MAUAPP[7]="$MAUID_WORD2016"
MAUAPP[8]="$MAUID_EXCEL2016"
MAUAPP[9]="$MAUID_POWERPOINT2016"
MAUAPP[10]="$MAUID_OUTLOOK2016"
MAUAPP[11]="$MAUID_ONENOTE2016"
MAUAPP[12]="$MAUID_OFFICE2011"
MAUAPP[13]="$MAUID_LYNC2011"
MAUAPP[14]="$MAUID_SKYPE2016"
MAUAPP[15]="$MAUID_INTUNECP"
MAUAPP[16]="$MAUID_REMOTEDESKTOP10"
}

BuildCollateralArray () {
# Builds an array of MAU collateral file-paths which we'll use later for downloading XML and CAT files
DOWNLOADARRAY[0]="$1"$MAUID_MAU3X
DOWNLOADARRAY[1]="$1"$MAUID_WORD2019
DOWNLOADARRAY[2]="$1"$MAUID_EXCEL2019
DOWNLOADARRAY[3]="$1"$MAUID_POWERPOINT2019
DOWNLOADARRAY[4]="$1"$MAUID_OUTLOOK2019
DOWNLOADARRAY[5]="$1"$MAUID_ONENOTE2019
DOWNLOADARRAY[6]="$1"$MAUID_WORD2016
DOWNLOADARRAY[7]="$1"$MAUID_EXCEL2016
DOWNLOADARRAY[8]="$1"$MAUID_POWERPOINT2016
DOWNLOADARRAY[9]="$1"$MAUID_OUTLOOK2016
DOWNLOADARRAY[10]="$1"$MAUID_ONENOTE2016
DOWNLOADARRAY[11]="$1"$MAUID_OFFICE2011
DOWNLOADARRAY[12]="$1"$MAUID_LYNC2011
DOWNLOADARRAY[13]="$1"$MAUID_SKYPE2016
DOWNLOADARRAY[14]="$1"$MAUID_INTUNECP
DOWNLOADARRAY[15]="$1"$MAUID_REMOTEDESKTOP10
DOWNLOADARRAY[1]="$1"$MAUID_MAU4X
DOWNLOADARRAY[2]="$1"$MAUID_WORD2019
DOWNLOADARRAY[3]="$1"$MAUID_EXCEL2019
DOWNLOADARRAY[4]="$1"$MAUID_POWERPOINT2019
DOWNLOADARRAY[5]="$1"$MAUID_OUTLOOK2019
DOWNLOADARRAY[6]="$1"$MAUID_ONENOTE2019
DOWNLOADARRAY[7]="$1"$MAUID_WORD2016
DOWNLOADARRAY[8]="$1"$MAUID_EXCEL2016
DOWNLOADARRAY[9]="$1"$MAUID_POWERPOINT2016
DOWNLOADARRAY[10]="$1"$MAUID_OUTLOOK2016
DOWNLOADARRAY[11]="$1"$MAUID_ONENOTE2016
DOWNLOADARRAY[12]="$1"$MAUID_OFFICE2011
DOWNLOADARRAY[13]="$1"$MAUID_LYNC2011
DOWNLOADARRAY[14]="$1"$MAUID_SKYPE2016
DOWNLOADARRAY[15]="$1"$MAUID_INTUNECP
DOWNLOADARRAY[16]="$1"$MAUID_REMOTEDESKTOP10
}

DownloadCollateralFiles () {
Expand Down Expand Up @@ -165,6 +168,7 @@ ArchiveCollateralFiles () {
if [ ! -d "$CACHEPATH/collateral/$APPVER" ]; then
mkdir "$CACHEPATH/collateral/$APPVER"
fi
cp "$SCRATCH_AREA/$APPID-chk.xml" "$CACHEPATH/collateral/$APPVER"
cp "$SCRATCH_AREA/$APPID.xml" "$CACHEPATH/collateral/$APPVER"
cp "$SCRATCH_AREA/$APPID.cat" "$CACHEPATH/collateral/$APPVER"
fi
Expand Down Expand Up @@ -230,11 +234,13 @@ GetAppNameFromMAUID () {
case "$1" in
$MAUID_MAU3X) APPNAME="MAU 3.x"
;;
$MAUID_MAU4X) APPNAME="MAU 4.x"
;;
$MAUID_WORD2019) APPNAME="Word 2019"
;;
$MAUID_EXCEL2019) APPNAME="Excel 2019"
;;
$MAUID_POWERPOINT2019) APPNAME="PowerPoint 2019"
$MAUID_POWERPOINT2019) APPNAME="PowerPoint 2019"
;;
$MAUID_OUTLOOK2019) APPNAME="Outlook 2019"
;;
Expand All @@ -244,7 +250,7 @@ GetAppNameFromMAUID () {
;;
$MAUID_EXCEL2016) APPNAME="Excel 2016"
;;
$MAUID_POWERPOINT2016) APPNAME="PowerPoint 2016"
$MAUID_POWERPOINT2016) APPNAME="PowerPoint 2016"
;;
$MAUID_OUTLOOK2016) APPNAME="Outlook 2016"
;;
Expand All @@ -258,7 +264,7 @@ GetAppNameFromMAUID () {
;;
$MAUID_INTUNECP) APPNAME="Intune Company Portal"
;;
$MAUID_REMOTEDESKTOP10) APPNAME="Remote Desktop v10"
$MAUID_REMOTEDESKTOP10) APPNAME="Remote Desktop v10"
;;
esac
echo "$APPNAME"
Expand Down
14 changes: 9 additions & 5 deletions psMacUpdatesOFFICE.ps1
@@ -1,4 +1,4 @@
<#
<#
.Synopsis
Download MAU update for mac
.DESCRIPTION
Expand Down Expand Up @@ -100,7 +100,8 @@ If ((compare-object $origContent $newContent).count -eq 0){
Break
}

$MAUID_MAU3X="0409MSAU03"
$MAUID_MAU3X="0409MSAU03"
$MAUID_MAU4X="0409MSAU04"
$MAUID_WORD2019="0409MSWD2019"
$MAUID_EXCEL2019="0409XCEL2019"
$MAUID_POWERPOINT2019="0409PPT32019"
Expand All @@ -120,7 +121,8 @@ $MAUID_REMOTEDESKTOP10="0409MSRD10"
function BuildApplicationArray() {
# Builds an array of all the MAU-enabled applications that we care about
$MAUAPP=@()
$MAUAPP+="$MAUID_MAU3X"
$MAUAPP+="$MAUID_MAU3X"
$MAUAPP+="$MAUID_MAU4X"
$MAUAPP+="$MAUID_WORD2019"
$MAUAPP+="$MAUID_EXCEL2019"
$MAUAPP+="$MAUID_POWERPOINT2019"
Expand Down Expand Up @@ -161,7 +163,8 @@ function DownloadCollateralFiles ([Parameter(Mandatory=$true)]$downloadarray,[Pa
$locationstring = ""
$UpdateVersions = ""
Write-Verbose "$down"
[io.file]::WriteAllbytes("$collarteralFolder\$down.xml",(Invoke-WebRequest -URI "$weburldown$down.xml").content)
[io.file]::WriteAllbytes("$collarteralFolder\$down.xml",(Invoke-WebRequest -URI "$weburldown$down.xml").content)
[io.file]::WriteAllbytes("$collarteralFolder\$down-chk.xml",(Invoke-WebRequest -URI "$weburldown$down-chk.xml").content)
[io.file]::WriteAllbytes("$collarteralFolder\$down.cat",(Invoke-WebRequest -URI "$weburldown$down.cat").content)


Expand Down Expand Up @@ -195,7 +198,8 @@ function DownloadCollateralFiles ([Parameter(Mandatory=$true)]$downloadarray,[Pa
new-item -ItemType Directory -Path $collateral -Name $pathtoput -Verbose
}
write-verbose "$collateral\$pathtoput\$down.xml"
Copy-Item -Path "$collarteralFolder\$down.xml" -Destination "$collateral\$pathtoput\$down.xml" -Verbose
Copy-Item -Path "$collarteralFolder\$down.xml" -Destination "$collateral\$pathtoput\$down.xml" -Verbose
Copy-Item -Path "$collarteralFolder\$down-chk.xml" -Destination "$collateral\$pathtoput\$down-chk.xml" -Verbose
Copy-Item -Path "$collarteralFolder\$down.cat" -Destination "$collateral\$pathtoput\$down.cat" -Verbose


Expand Down

0 comments on commit e4c27bd

Please sign in to comment.