We are upgrading our EMET 3.0 to 4.1 Update 1 through SCCM 2012 SP1. There are two deployments, the first deploys the EMET MSI, the second runs a batch file that does the following:
REM COPY EMET CONF File
copy "\\SCCM SERVER\sources\packages\EMETConf\EMET_CONF_UPDATE\EMET4.1.1.xml" "C:\Program Files (x86)\EMET 4.1\"
REM DELETE OLD EMET CONFIG
start /d "C:\Program Files (x86)\EMET 4.1" EMET_Conf.exe --delete_all
REM RUN EMET_CONF
start /d "C:\Program Files (x86)\EMET 4.1" EMET_Conf.exe --import SA_EMET4.1.1.xml
What I have found is that sometimes (and not) the EMET_AGENT.EXE process is not running. The above steps fail if the process is not running. I want to inject a line into this batch file that says if the EMET_AGENT.EXE processis not running, start it. If it is, skip starting it.
I had something like below, but just can't get it to work. Any ideas?
tasklist /nh /fi "imagename eq EMET_AGENT.EXE" | find /i "EMET_AGENT.EXE" > nul ||
Thanks in advance
Hope this Helps. Please check as answer if you are satisfied with my response or click "Vote as Helpful". Thanks