Flip4Mac Serial Number as an attribute

dzmudzki
New Contributor

I thought that below script might be useful to some people on this forum.

#This attribute returns the serial number present on the machine for Flip4Mac.

#!/bin/sh

if [ -f "/Library/Preferences/net.telestream.wmv.plist" ]; then result=/usr/bin/defaults read /Library/Preferences/net.telestream.wmv | grep SerialNumber | awk '{print $3}' | sed 's/"//g' | sed 's/;//g'
fi

echo "<result>$result</result>"

4 REPLIES 4

rockpapergoat
Contributor III

if you specify the key to read (SerialNumber), you won't need to use grep or sed.

i suspect you could get by with:

echo "<result>/usr/bin/defaults read /Library/Preferences/net.telestream.wmv SerialNumber</result>"

ernstcs
Contributor III

If you have valid extension attributes for Flip4Mac (wish we didn't have to deal with it) you should submit them on the third-party page for them to help others out. It's located at:

https://jamfnation.jamfsoftware.com/viewProduct.html?id=65&view=info

I'm submitting my version one just now since I see it's not there. I do a lot of these things based on Extension Attributes of actually installed version instead of what the last version Casper installed because my users have admin and can update on their own in many cases.

#!/bin/sh

if [ -e /Library/Internet Plug-Ins/Flip4Mac WMV Plugin.plugin ]; then

result="$(/bin/cat /Library/Internet Plug-Ins/Flip4Mac WMV Plugin.plugin/Contents/Info.plist | grep -B 1 -m 1 CFBundleSignature | grep string | sed 's/.*<string>(.*)</string>.*/1/')"
echo "<result>$result</result>"
else
echo "<result>Not Installed</result>"
fi

mm2270
Legendary Contributor III

@ernstcs - no need to use such a long command to pull that info. Use defaults instead.

defaults read /Library/Internet Plug-Ins/Flip4Mac WMV Plugin.plugin/Contents/Info CFBundleShortVersionString

ernstcs
Contributor III

<----- sucks at the scripts