5 Replies Latest reply on Jun 27, 2017 2:26 PM by creese40

    EEDK

    creese40

      I need some insight on this bat file for EEDK

      I want to add to the custom property field. Example add types of server: SQL, Exchange, Domain Controller etc.

       

      Where do i add the command FrmInst.exe /CustomProps=1"server type" etc in the bat file?

       

      @echo off

      :: Get number of input parameters

      set argC=0

      for %%x in (%*) do Set /A argC+=1

      :: ################################################

      :: Set environment to current product folder

      pushd "%~dp0"

      :: Get software package source directory and set as variable SRCDIR

      SET SRCDIR=

      for /f "delims=" %%a in ('cd') do @set SRCDIR=%%a

      if %argC%==0 GOTO INSTALL

      if %1==uninstall GOTO UNINSTALL

      :INSTALL

      %comspec% /c %systemroot%\system32\msiexec.exe /i "%SRCDIR%\McProfilerSetup.msi" /quiet

      GOTO END

      :UNINSTALL

      %comspec% /c %systemroot%\system32\MsiExec.exe /X{McProfilerSetup.msi} /quiet

      :END

      goto EOF

      :: Exit and pass proper exit to agent

      :: ################################################

      :EOF

      Exit /B 0

       

       

      Cornell@

        • 1. Re: EEDK
          tao
          • 2. Re: EEDK
            Moe Hassan

            creese40, you can add multiple FrmInst.exe /CustomProps=1"server type" statements just before the EXIT command. Be sure to change CustomProps=2, 3, 4 etc. Instead of "setting" values, if you want to "read" values, please also see some later posts in this thread : MA 5.0 location in the registry of the custom props

            1 of 1 people found this helpful
            • 3. Re: EEDK
              creese40

              Moe Hassan did i put it in the right place  @Moe Hassan 

               

              @echo off

              :: Get number of input parameters

              set argC=0

              for %%x in (%*) do Set /A argC+=1

              :: ################################################

              :: Set environment to current product folder

              pushd "%~dp0"

              :: Get software package source directory and set as variable SRCDIR

              SET SRCDIR=

              for /f "delims=" %%a in ('cd') do @set SRCDIR=%%a

              if %argC%==0 GOTO INSTALL

              if %1==uninstall GOTO UNINSTALL

              :INSTALL

              %comspec% /c %systemroot%\system32\msiexec.exe /i "%SRCDIR%\McProfilerSetup.msi" /quiet

              GOTO END

              :UNINSTALL

              %comspec% /c %systemroot%\system32\MsiExec.exe /X{McProfilerSetup.msi} /quiet

              :END

              goto EOF

              FrmInst.exe /CustomProps=1"SQL"

              :: Exit and pass proper exit to agent

              :: ################################################

              :EOF

              Exit /B 0

              • 4. Re: EEDK
                Moe Hassan

                Hi creese40, please correct me if my understanding is wrong. Your script is basically installing another product which is NOT McAfee Agent. Are you running this on systems with or without McAfee agent already installed on them? This is very important because the commands will be different.

                 

                If installing McAfee agent in the process, command would be:

                FramePkg.exe /install=agent /CustomProps=1 "SQL" /CustomProps=2 "Application Server"

                 

                If the system already has McAfee agent, you can set/modify several properties in single command

                maconfig.exe -custom -prop1 "value1" -prop2 "value2"

                FrmInst.exe /CustomProps=1"SQL" > is wrong syntax (per KB) below..

                 

                McAfee Corporate KB - Documentation Correction: McAfee Agent 4.8 and 5.0.x (On-Premise) Product Guides KB82885

                1 of 1 people found this helpful
                • 5. Re: EEDK
                  creese40

                  Ok I'm not very good at scripts.  Systems already have the agent on them. I'm going to EEDK to package this @Moe Hassan

                   

                   

                  @echo off

                       pushd "%~dp0"

                       if "%*" == "" (EXIT) Else set cmdstr=%*

                   

                       REM Windows operating system command string syntax: maconfig -custom -prop1 "Property 1" -prop2 "Property 2" -prop3 "Property 3" -prop4 "Property 4"

                   

                        "%ProgramFiles%\McAfee\Agent\maconfig.exe" "%ProgramFiles%\mcafee\Agent\maconfig.exe" -custom -prop3 "%cmdstr%"

                        "%ProgramFiles(x86)%\McAfee\Common Framework\maconfig.exe" "%ProgramFiles(x86)%\mcafee\common framework\maconfig.exe" -custom -prop3 "%cmdstr%"

                   

                       popd

                       Exit /B 1707