1 2 Previous Next 17 Replies Latest reply on Apr 28, 2017 12:23 PM by crackerjak

    MA 5.0 location in the registry of the custom props

    TomPijnenburg1

      we consider to migrate to MA 5.0. We use custom props in the registry. Is this still possible with MA 5.0 and where are these in the regsitry?

       

      Regards Tom

        • 1. Re: MA 5.0 location in the registry of the custom props
          system48

          You can still use custom properties but they are not stored in the registry anymore, see KB83622.

           

          McAfee KnowledgeBase - Custom properties are not reported to ePO after upgrading from MA 4.8 to MA 5.0.0

          1 of 1 people found this helpful
          • 2. Re: MA 5.0 location in the registry of the custom props
            awbattelle

            I took a look at look at the MA.Db  file, and have no idea how we are supposed to write to it with our 3rd party software, We have been modifying the custom props at image time. We have been populating it to identify things like, Surface Pros and tell EPO how to tag a particular type of system.

            I note that EPO still cannot tell the difference between a tablet and a laptop. We have been able to use the custom props to address this. Now. How are we supposed to pre -populate this information? The ma.db appears to contain mostly binary information, and I cannot for the life of me find a clear text line that says "Custom Props"

            Is there some sort of tool we can use to edit this file?

            1 of 1 people found this helpful
            • 3. Re: MA 5.0 location in the registry of the custom props
              andrep1

              I have this script I use to take care of that, in our context what this script does is to collect hardware information and last reboot time and updates the custom props.

              It accounts for MA4 and MA5 in different locations.

              The ma5x sub is the part you want. It is not pretty but it is the only approved way...

               

              option explicit
              on error resume next

              Dim strComputer, objReg, objItem, objWMIService, colItems,  strValue, strExecName, strExecParams
              Dim strModel, strCompany, strSerial, strBootTime
              Dim objShell
              Dim strKeyPath, strValueName
              const HKEY_LOCAL_MACHINE = &H80000002

              'Main
              strComputer = "."
              Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &strComputer & "\root\default:StdRegProv")

              Call GetInfo

              if AgentMajorVer() = 4 then
              MA4x()
              else
              MA5x()
              end if

              set objReg = Nothing
              wscript.quit
              'end
              '--------------------------------------
              'Get the data from WMI
              '--------------------------------------
              Sub GetInfo
              Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

              Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem",,48)
              For Each objItem in colItems
                strModel = objItem.Model
              Next

              Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS",,48)
              For Each objItem in colItems
                strCompany = objItem.Manufacturer
                strSerial = objItem.SerialNumber
              Next

              Set colItems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem",,48)
              For Each objItem in colItems
                strBootTime = left(objItem.LastBootUpTime,8)& "_" & mid(objItem.LastBootUpTime,9 ,4)
              Next

              set objWMIService = Nothing
              End Sub
              '--------------------------------------
              'Determine McAfee agent major version
              '--------------------------------------
              Function AgentMajorVer
              strKeyPath = "SOFTWARE\Network Associates\ePolicy Orchestrator\Agent\CustomProps"
              objReg.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Network Associates\TVD\Shared Components\Framework\", "Version", strValue
              AgentMajorVer = CINT(left(strValue,1))
              End Function

              '--------------------------------------
              sub MA4x
              strKeyPath = "SOFTWARE\Network Associates\ePolicy Orchestrator\Agent\CustomProps"
              objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

              strKeyPath = "SOFTWARE\Network Associates\ePolicy Orchestrator\Agent\CustomProps"

              strValueName = "CustomProps1"
              strValue = strCompany
              objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

              strValueName = "CustomProps2"
              strValue = strModel
              objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

              strValueName = "CustomProps3"
              strValue = strSerial
              objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

              strValueName = "CustomProps4"
              strValue = strBootTime
              objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
              end sub

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

              • 4. Re: MA 5.0 location in the registry of the custom props
                awbattelle

                OK, So, McAfee has a utility for modifying the custom props in MA5, much simpler than the above solution. It's called maconfig.exe. We found this out by opening a ticket. I'm sorry for Andre who dd all the programming work for nothing. We opened a ticket with support and this is what we found.

                 

                You will find MAConfig it in one of 2 places. On fresh MA5 installs it will be here:

                C:\Program Files\McAfee\Agent
                On Upgrade installs, you will find it here;

                C:\Program Files (x86)\McAfee\Common Framework\maconfig.exe

                 

                The Syntax for changing a custom props is as follows:

                 

                "C:\Program Files (x86)\McAfee\Common Framework\maconfig.exe" -custom -prop1 "YourValue"

                or

                "C:\Program Files\McAfee\Agent\maconfig.exe" -custom -prop1 "YourValue"

                 

                You can substitute the -prop1 value for any of the 4, I think you can add multiple ones on the same line. You will have to experiment.

                To get a full list of maconfig functions  maconfig.exe -help

                1 of 1 people found this helpful
                • 5. Re: MA 5.0 location in the registry of the custom props
                  andrep1

                  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

                  1 of 1 people found this helpful
                  • 6. Re: MA 5.0 location in the registry of the custom props
                    awbattelle

                    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.

                    • 7. Re: MA 5.0 location in the registry of the custom props
                      caligula

                      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"

                      • 8. Re: MA 5.0 location in the registry of the custom props
                        tabrezg

                        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.

                        • 9. Re: MA 5.0 location in the registry of the custom props
                          tabrezg

                          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"

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

                          1 2 Previous Next