Skip to main content
Question

Flip4Mac Serial Number as an attribute

  • April 19, 2012
  • 4 replies
  • 21 views

Forum|alt.badge.img+7

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

Forum|alt.badge.img+13

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>"


Forum|alt.badge.img+21
  • Contributor
  • March 7, 2014

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
Forum|alt.badge.img+24
  • Legendary Contributor
  • March 7, 2014

@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

Forum|alt.badge.img+21
  • Contributor
  • March 7, 2014

<----- sucks at the scripts