How to find the version of the Eracent Agent

jwojda
Valued Contributor II

Anybody using eracent? I'm looking for a way to pull the version of the agent installed, but it doesn't show up under plugins or installed applications. I could scope off the installed package, but was hoping for a better way to check against the app as that can get messy once multiple packages are brought in.

6 REPLIES 6

Snickasaurus
Contributor

Never used it before but perhaps it has some info in a plist located within the app/agent.

Example when I check Microsoft Excels version I run:

defaults read /Applications/Microsoft Office 2011/Microsoft Excel.app/Contents/version.plist CFBundleShortVersionString

Perhaps a starting point? Hope you get it figured out!

jwojda
Valued Contributor II

it doesn't seem to have a plist file, i found an XML file that does have the Version= that I need, but not sure how to extract the data.

nessts
Valued Contributor II

just guessing,
awk -F= '/Version/{print $2"}' xmlfile

Snickasaurus
Contributor

@nessts beat me to it. Was on a conference call and when I finished (apparently I didn't have enough fight in me to be on the call and hit the "Post It" button) he already answered it.

Hope is one liner helps out. If not please post the xml or relative portion.

jwojda
Valued Contributor II

I appreciate you guys taking the time to look at this!

<?xml version="1.0" encoding="utf-8" ?>
<ScannerConfig
    Version="9.8.0.69" >
    <Scanner>
        <!--

when I tried the awk command it returned this...(note, I tried with the " as shown in your example, as well as some variations there-of to get it to work; all returned the below behavior

sudo awk -F='/Version/{print $2}' /private/var/Eracent/EPA/conf/ScannerConfig.xml 
awk: syntax error at source line 1
 context is
     >>> /private/var/Eracent/EPA/conf/ScannerConfig. <<< xml
awk: bailing out at source line 1

mm2270
Legendary Contributor III
awk -F'"' /Version/{print $2}' /path/to/xmlfile

should do it.

Edit: BTW, the reason you were getting that error is because you weren't including a space between the -F= and '/Version/{print $2}' Look closely at what @nessts][/url posted and you'll see the space between them.