1

I am writing a Batch File to uninstall McAfee Endpoint Security Web Control with cmd. I am utilizing WMIC to do this. When I run the script, it stops immediately after the wMIC command is run. When run it manually everything works fine in cmd

wmic product where name=”McAfee Endpoint Security Web Control” call uninstall /nointeractive

My Script

@Echo Off
Title McAfee Endpoint Security Web Control
Echo Remove McAfee Endpoint Security Web Control
WMIC product where name=”McAfee Endpoint Security Web Control” call uninstall /nointeractive` 

This gives an error

Endpoint - Invalid alias verb

Please suggest correction.

Compo
  • 36,585
  • 5
  • 27
  • 39

2 Answers2

0

Please copy and paste, and give this a go as is.

@echo Off
title "McAfee Endpoint Security Web Control"
echo Removing McAfee Endpoint Security Web Control
WMIC product where name="McAfee Endpoint Security Web Control" call uninstall /nointeractive 
Gerhard
  • 22,678
  • 7
  • 27
  • 43
0

I equally had trouble trying to uninstall apps, but after many tries I figured it out so firstly you only put the quotation marks around the product name “”, i.e

product where name= “actual product name” call uninstall 

Note that everything should be in lower case, then another thing to put into consideration is to make sure you know the directory which you want perform the query from. Don't go to system32 if you have not put or installed any app in there.

John Smith
  • 1,027
  • 15
  • 31