Uninstall McAfee LiveSafe silently from the commandline #WhatILearnedToday

03.11.2020

Do you know that feeling when you use your favorite search engine with “this should be easy, someone will already have figured out how to do this” in mind?

This is how my work on the topic I´m describing in this post started. And because this blogpost exists, you might assume correctly that this was not the case for the challenge I was facing:

Silently uninstalling the McAfee LiveSafe bloatware trial version on a fresh installed Windows 10 PC. (Seriously Microsoft – You should make Windows less expensive to the OEMs so they “don´t have to” sell space for crapware on their customers computers. How great would it be to have a clean Windows installed from the start for everyone? Customer Experience anyone? )

While doing this manually might be (and probably is) the best solution for a single device, uninstalling this software from “Add/Remove Programs” is not an option if you have to get rid of it on many PCs.

Unfortunately McAfee seems to think that uninstalling their software should be really hard – they even put a captcha in the manual uninstall process!. They don´t provide any command line parameters or uninstall information besides “Use Add/Remove programs” or “use the McAfee Consumer Products Removal Tool” with a Gui. Uninstalling via PowerShell did not work either.

(For the Enterprise part of their software they provide a different tool called “Endpoint Product Removal Tool” , which seems to accept command line parameters.)

So a little digging was needed to find out how to achieve the goal: A silent uninstall of McAfee LiveSafe (and all other McAfee Products)

Here´s is how to do it (please note that the solution is working today 03.11.2020 with McAfee LiveSafe Version 16.0R24)

a) Download the McAfee Consumer Product Removal Tool (http://us.mcafee.com/apps/supporttools/mcpr/mcpr.asp )

b) Open an elevated PowerShell window

c) Navigate to the folder you saved the MCPR.exe to.

d) Start MCPR.exe and do not close the window, click next or click cancel. We just need the installer to extract the files we want to use.

e) Navigate to your local appdata folder cd $Env:LocalAppdata\Temp 

f) Copy the folder “MCPR” to any other folder on your Harddrive (e.g. c:\temp\KillMcAfee)

Because of the -Force Parameter, the folder will be created even if it does not exist.

copy-item -Path .\MCPR\ -Destination c:\temp\KillMcAfee -Recurse -Force

g) Navigate to the folder where you copied the data to.

h) Close the still open Uninstall User Interface by clicking cancel

i) Now that the Gui is closed, it´s time to uninstall McAfee LiveSafe without any Gui with PowerShell:

.\Mccleanup.exe -p StopServices,MFSY,PEF,MXD,CSP,Sustainability,MOCP,MFP,APPSTATS,Auth,EMproxy,FWdiver,HW,MAS,MAT,MBK,MCPR,McProxy,McSvcHost,VUL,MHN,MNA,MOBK,MPFP,MPFPCU,MPS,SHRED,MPSCU,MQC,MQCCU,MSAD,MSHR,MSK,MSKCU,MWL,NMC,RedirSvc,VS,REMEDIATION,MSC,YAP,TRUEKEY,LAM,PCB,Symlink,SafeConnect,MGS,WMIRemover,RESIDUE -v -s

The uninstallation will take a while. I did not have to reboot but this might change in your environment.

I assume you could specify single packages if you wanted to keep some McAfee products on your computer by removing them from the command (hence I don´t know why you would want this…)

j) Delete the folder if you don´t need it any more.

Using this method, you can easily deploy the uninstallation to any number of PCs using your favorite software distribution tools (like Intune or Configuration Manager 😉 ). Just make sure to include the complete content of the MCPR-folder in your uninstall package.

UPDATE 06.11.2020

One way of deploying this via Intune:

a) create a batch file (e.g. Silent_uninstall.bat) in your MCPR-Folder

b) pack the MCPR-folder as *.intunewin file with the Intune Content Prep Tool (GitHub – microsoft/Microsoft-Win32-Content-Prep-Tool: A tool to wrap Win32 App and then it can be uploaded to Intune)

c) create a new application in Intune and assign it to a group of users or devices.

on the requirements page, create a requirement that checks if the McAfeee Registry key exists. This is one easy way to check if any McAfee software is installed. Please make sure the requirement fit´s for your environment.

In the detection rules section we use the same registry key to check if it is gone. If yes, we assume the software is uninstalled. Again, check if that is a good solution for your environment.

Finally assign it to a group of devices or users to get rid of McAfee LiveSafe.

 

24 thoughts on “Uninstall McAfee LiveSafe silently from the commandline #WhatILearnedToday

  1. Hey, first of all this is incredible, thank you for posting it.
    I spent such time trying to find an automatic way to get Mcafee off 200+ laptops. Eventually we just had the team remove them manually over several days. Unreal.
    Any tips on deploying this through Intune?

  2. Hey there! I wanted to reach out and thank you a ton for posting this. We are in the process of getting ready to use Autopilot on 1300+ devices that are coming with this cr@pware built-in. We spent a couple of days on this and to no avail could either find or build a solution. We were able to get to the point where we were taking the files from the %temp% folder but could never get the batch file to quite do what we wanted. You seriously shaved hours upon hours off our techs hands out in the field from having to run their removal tool manually per machine. Your solution works flawlessly and you laid it out precisely. Thanks again 🙂

  3. Thank you so much! I rolled out 200+ Lenovo laptops with autopilot after the summer and could not find a way to automate this. Now i finally can! Thanks thanks thanks!

  4. My man, you’ve saved my ass at work, I’ve been trying to sus this for months with the HP laptops and I was getting tired of unboxing them just to re-install Windows, thank you so much for this guide you are a god damn legend!

  5. man, you really rock. i just went down the same route as you almost going to givie up, when i found this post of yours, which saved me hours.
    thank you.

  6. Having a bit of trouble creating the intunewin file to get this working through Intune. Any chance you could provide the file as a downloadable link? This would help immensely!

  7. Hey. Sorry. When I wrap the MCPR folder into an intunewin file, what am I using as the setup file with the “-s” command? The mccleanup.exe file or the Silent_uninstall.bat file? The utility won’t let me run it without indicating a setup file.

  8. this is amazing but maybe i’m confused.

    when i run the git wrapper, i know everything should be in the MCPR folder along with my Silent_Uninstall.bat file but what do i use for the source file? i feel like im packaging this wrong during that step.

  9. wowwwww
    i love you! it also worked with version 16.0 R18, you are the only one who found the right solution congratulations! and thank you again!

  10. This was fantastic and exactly what I needed!

    Can you post some way to send you a tip – I’d love to buy you a coffee!

  11. Hi Christian ,

    I am desperate to try this option.

    It doesn’t work for me.

    Could you please tell us how you pack the intune file?

    Maybe there is our mistake.

    Here is our command (we do it in powershell):
    .\IntuneWinAppUtil.exe -c C:\temp\KillMcAfee -s “C:\temp\KillMcAfee\Silent_uninstall.bat” -o “C:\intune apps”

  12. Hello there, it doesn’t work over intune on version 16.0R30. i’ve followed all steps and all works but the intune. Any suggestion?

  13. Hi Christian, firstly thank you for this but I am running into an issue, I cant seem to get the intune side of things to work/.bat file! If i run the command starting with .\Mccleanup.exe -p StopServices…. works perfectly via a powershell command but when I try creating the silent_uninstall.bat this doesnt even work locally? instead of starting with .\Mccleanup.exe -p StopServices for the .bat im using %~dp0Mccleanup.exe -p StopServices as in your example but no luck where am I going wrong?

    Thanks in advance

  14. A great post. Unfortunately it doesn’t quite work. Pops up an error: –
    LSP Uninstall Error
    ClockDownUtility::CreateInstall_Auth() – 64 bit, failed

    This is on Win10 Home edition, just reinstalled.

  15. Wow, been looking for this for almost 2 years now, FINALLY someone made it work. Fantastic, thank you very much!

    Distributed the software via intune but made it a powershell script instead of a batch script with this single line:
    Start-Process -Wait -FilePath “$($PSScriptRoot)\Mccleanup.exe” -ArgumentList “-p StopServices,MFSY,PEF,MXD,CSP,Sustainability,MOCP,MFP,APPSTATS,Auth,EMproxy,FWdiver,HW,MAS,MAT,MBK,MCPR,McProxy,McSvcHost,VUL,MHN,MNA,MOBK,MPFP,MPFPCU,MPS,SHRED,MPSCU,MQC,MQCCU,MSAD,MSHR,MSK,MSKCU,MWL,NMC,RedirSvc,VS,REMEDIATION,MSC,YAP,TRUEKEY,LAM,PCB,Symlink,SafeConnect,MGS,WMIRemover,RESIDUE -v -s” -WindowStyle Minimized

  16. You sir are the bomb! We just received a bunch of Lenovo laptops that came with this crap installed. The Intune uninstaller was so easy thanks to you! Keep up the good work!

Leave a Reply to Christian Lehrer Cancel reply

Your email address will not be published. Required fields are marked *