batch-file - 使用批处理文件卸载 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`
这给出了一个错误
端点 - 无效的别名动词
请建议更正。
解决方案
请复制并粘贴,然后按原样试一试。
@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
推荐阅读
- java - 在网格中查找某些多米诺骨牌的所有位置
- kubernetes - 如何在 GKE 中正确执行 cron 任务
- nginx - 如何在 Nginx 反向代理后面集成 Minio 并与 JavaScript API 交互?
- python - Python Telegram 机器人获得所有工作和他们的名字?
- c# - 将 MenuItems 添加到控制台应用程序中 TrayIcon 的上下文菜单
- c# - restsharp 响应不包含任何内容
- haskell - 在使用使用记录语法定义的构造函数时如何定义 Applicative 和 Monad 的实例
- swift - 如何为 Publisher 编写自定义运算符?
- mysql - 如何在 laravel 中制作像下面这样的连接表
- linux - mailutils mailx 为附件设置“Content-Disposition:附件”