forked from pbowden-msft/ExtensionAttributes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAU_Channel.xml
29 lines (28 loc) · 1.42 KB
/
MAU_Channel.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?><extensionAttribute>
<displayName>MAU_Channel</displayName>
<displayInCategory>Extension Attributes</displayInCategory>
<description>Reports the effective Channel of Microsoft AutoUpdate for Mac</description>
<dataType>string</dataType>
<scriptContentsMac>#!/bin/sh
if [ -d /Library/Application\ Support/Microsoft/MAU2.0/Microsoft\ AutoUpdate.app ]; then
ChannelName=`python -c "from Foundation import CFPreferencesCopyAppValue; print CFPreferencesCopyAppValue('ChannelName', 'com.microsoft.autoupdate2')"`
if [ "$ChannelName" == "External"]; then
echo "<result>Insider Slow</result>"
elif [ "$ChannelName" == "Insider_Fast"]; then
echo "<result>Insider Fast</result>"
elif [ "$ChannelName" == "Internal"]; then
echo "<result>Microsoft</result>"
elif [ "$ChannelName" == "Dogfood"]; then
echo "<result>Dogfood</result>"
elif [ "$ChannelName" == "Custom"]; then
ManifestServer=`python -c "from Foundation import CFPreferencesCopyAppValue; print CFPreferencesCopyAppValue('ManifestServer', 'com.microsoft.autoupdate2')"`
echo "<result>Custom - $ManifestServer</result>"
else
echo "<result>Production</result>"
fi
else
echo "<result>Not installed</result>"
fi
exit 0</scriptContentsMac>
<scriptContentsWindows/>
</extensionAttribute>