cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 11 of 19

Re: MA 5.0 location in the registry of the custom props

We're saying the same thing. That's exactly what I'm using in my script.

I just wrap it up to account for agent 4 and 5 and to account for different install locations.

sub MA5x
objReg.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\McAfee\Agent", "InstallPath", strValue

strExecName = chr(34) & strValue & "maconfig.exe" & chr(34)
strExecParams = " -custom " & "-prop1 " & chr(34) & strCompany & chr(34) & " -prop2 " & chr(34) & strModel & chr(34) & " -prop3 " & chr(34) & strSerial & chr(34) & " -prop4 " & chr(34) & strBootTime & chr(34)

Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.run(strExecName&strExecParams),0,true
end sub

Highlighted
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 12 of 19

Re: MA 5.0 location in the registry of the custom props

OK, yes I see now. But, I think it's important to explain the basic operation, especially to those who might just only know CMD batch code. But, OK, you can use Powershell, or whatever you want with it.

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
Highlighted

Re: MA 5.0 location in the registry of the custom props

Tom

As the above replies have eluded to Custom Props are no longer stored in the Registry but ran from the MAConfig.exe with switches.

Personally I have a logon Powershell GPO to keep this updated below (well as users logon) below.


I'm sure this will help some users.

# NEW McAfee AV Custom Props by P.A.Williams

# Both Install Locations Covered below.

$MAC = "C:\Program Files\McAfee\Agent\maconfig.exe"

If(-not(Test-Path -Path $MAC))
  {
   $MAC = "C:\Program Files (x86)\McAfee\Common Framework\maconfig.exe"
  }


#WMI Queried (below are All IP's and Hardware but others can be added)

$Model = Get-WmiObject -class Win32_ComputerSystem | select -expand Model
$IP = Get-WmiObject -class Win32_NetworkAdapterConfiguration | where {$_.IPAddress} | select -expand IPAddress | Where {$_ -like '1*'}

#Output including GPO text to confirm it's working

& $MAC "-custom" "-prop1" "$Model" "-prop2" "$IP" "-prop4" "Applied via GPO"

Highlighted
Level 7
Report Inappropriate Content
Message 14 of 19

Re: MA 5.0 location in the registry of the custom props

so, how do we READ what is set within customprops now?  the DB is not a plain text file, and we used to read the Registry locally for the entries during re-image and what not for key items.  We have lost this ability unless there is a way to read the values within the custom props now that I'm missing?

thanks !

  Mike B

Highlighted
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 15 of 19

Re: MA 5.0 location in the registry of the custom props

@Mike, There are two ways custom properties can be populated. In ePO system tree, whenever you click on a system, and look at system properties tab, the values should be there. The latest Agent 5.0.5 supports up to 8 custom properties. There are two ways these fields can be populated. One is where you SET the values, the other is where you GET/READ/FETCH from the system utilizing a script of some sort. I personally prefer the latter because I would like to know when a system was last rebooted, and possibly some additional network information. This process is a little trickier. I wish there was an easy way. I've got the script to work but the caveat is you kind of have to deploy again and again especially if the values that you seek are dynamic in nature (ie - last reboot) as opposed to something static (ie - serial number).

Highlighted

Re: MA 5.0 location in the registry of the custom props

have you ever though about assigning the client task to a group?

Do you set the custom settings initially in the Framepkg install?

FRAMEPKG /INSTALL=AGENT /Customprops1="prop1" / Customprops2="prop2" /Customprops3="prop3"

Highlighted
Level 7
Report Inappropriate Content
Message 17 of 19

Re: MA 5.0 location in the registry of the custom props

you can just use:

 

<McAfee-Agent-Path>\cmdagent.exe /i

or

<McAfee-Agent-Path>\cmdagent.exe /x

(slash or dash doesnt matter! => /x or -x)

 

to obtain currently set CustomProps.

 

BR MarioW

Highlighted

Re: MA 5.0 location in the registry of the custom props

i am trying to get the information of installed softwares on end points using custom properties after trying alot i coudnt figure out, any help will be appreciated.

Highlighted

Re: MA 5.0 location in the registry of the custom props

i am trying below for installed applications in custom property 3 but i do not get any information there although when i run locally on computer it works fine.

----------------------------------------------------------------------------

# Both Install Locations Covered below.

$MAC = "C:\Program Files\McAfee\Agent\maconfig.exe"

If(-not(Test-Path -Path $MAC))

  {

   $MAC = "C:\Program Files (x86)\McAfee\Common Framework\maconfig.exe"

  }

#WMI Queried (below are All IP's and Hardware but others can be added)

$Model = Get-WmiObject -class Win32_ComputerSystem | select -expand Model

$App = Get-WmiObject -Class Win32_Product | Select-Object Name

$serial = Get-WmiObject win32_bios | Select-Object serialnumber

#Output including GPO text to confirm it's working

& $MAC "-custom" "-prop1" "$Model" "-prop2" "$App" "-prop3" "$serial" "-prop4" "Applied via GPO1"

---------------------------------------------------------------------------------------

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community