Thanks to @mm2270 and @rtrouton I have taken Mike's update script and Rich's adobe flash update script and figured out how to make the Microsoft Silverlight script.
1#!/bin/sh23# Silverlight Lastest Version URL4###############################5silLightCheckURL="http://www.microsoft.com/getsilverlight/locale/en-us/html/Microsoft%20Silverlight%20Release%20History.htm"6URL="${silLightCheckURL}"78###############################910# Determine OS version11###############################12osvers=$(sw_vers -productVersion | awk -F. '{print $2}')131415# Current Microsoft Silverlight Version16###############################17curr_Vers=$( curl -sf "${URL}" 2>/dev/null | grep -m1 "Silverlight 5 Build" | awk -F'[>|<]' '{print $2}' | tr ' ' '18' | awk '/Build/{getline; print}' )1920# Download URL Microsoft Silverlight Version21###############################22download_url=$( curl -sfA "$UGENT" "http://go.microsoft.com/fwlink/?LinkID=229322" | awk -F'"' '{print $2}' | sed '/^$/d' )23sl_dmg="silverlight.dmg"242526if [[ ${osvers} -lt 6 ]]; then27 echo "Buy a new Mac!"28fi2930if [[ ${osvers} -ge 6 ]]; then3132 # Download the latest Microsoft Silverlight software disk image3334 /usr/bin/curl --output "$sl_dmg" "$download_url"3536 # Specify a /tmp/silverlight.XXXX mountpoint for the disk image3738 TMPMOUNT=`/usr/bin/mktemp -d /tmp/silverlight.XXXX`3940 # Mount the latest Silverlight disk image to /tmp/silverlight.XXXX mountpoint4142 hdiutil attach "$sl_dmg" -mountpoint "$TMPMOUNT" -nobrowse -noverify -noautoopen4344 pkg_path="$(/usr/bin/find $TMPMOUNT -maxdepth 1 ( -iname *Silverlight*.pkg -o -iname *Silverlight*.mpkg ))"4546 # Before installation on Mac OS X 10.7.x and later, the installer's47 # developer certificate is checked to see if it has been signed by48 # Microsoft's developer certificate. Once the certificate check has been49 # passed, the package is then installed.5051 if [[ ${pkg_path} != "" ]]; then52 if [[ ${osvers} -ge 7 ]]; then53 signature_check=`/usr/sbin/pkgutil --check-signature "$pkg_path" | awk /'Developer ID Installer/{ print $5 }'`54 if [[ ${signature_check} = "Microsoft" ]]; then55 # Install Microsoft Silverlight from the installer package stored inside the disk image56 /usr/sbin/installer -dumplog -verbose -pkg "${pkg_path}" -target "/"57 fi58 fi5960 # On Mac OS X 10.6.x, the developer certificate check is not an61 # available option, so the package is just installed.6263 if [[ ${osvers} -eq 6 ]]; then64 # Install Microsoft Silverlight from the installer package stored inside the disk image65 /usr/sbin/installer -dumplog -verbose -pkg "${pkg_path}" -target "/"66 fi67 fi6869 # Clean-up7071 # Unmount the Microsoft Silverlight disk image from /tmp/silverlight.XXXX7273 /usr/bin/hdiutil detach "$TMPMOUNT"7475 # Remove the /tmp/silverlight.XXXX mountpoint7677 /bin/rm -rf "$TMPMOUNT"7879 # Remove the downloaded disk image8081 /bin/rm -rf "$SilverlightDMG"82fi838485exit 0