首页 > 解决方案 > 使用批处理文件卸载 wmic

问题描述

我正在编写一个批处理文件来使用 cmd 卸载 McAfee Endpoint Security Web Control。我正在利用 WMIC 来做到这一点。当我运行脚本时,它会在 wMIC 命令运行后立即停止。手动运行时,在 cmd 中一切正常

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

我的脚本

@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` 

这给出了一个错误

端点 - 无效的别名动词

请建议更正。

标签: batch-fileuninstallationwmicmcafee

解决方案


请复制并粘贴,然后按原样试一试。

@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 

推荐阅读