是否有命令检查是否安装了防病毒软件?

is there a command to check if there was any antivirus installed?

我正在寻找一个命令来列出 antivirus 安装在 Windows 上。如果当前安装了 none,我希望它 指示此

非常感谢

至少在 windows 10 中(目前我无法在另一个版本中测试它,但它至少应该适用于 windows 7 或更高版本)

wmic /namespace:\root\SecurityCenter2 path AntiVirusProduct get * /value

您可以使用此命令列出您系统中的所有 运行 防病毒软件:

WMIC /Node:localhost /Namespace:\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List

尝试将 wmic 命令与 findstr 命令结合使用。应该适用于 Windows Vista 和更高版本

wmic /node:localhost /namespace:\root\SecurityCenter2 path AntiVirusProduct Get DisplayName | findstr /V /B /C:displayName || echo No Antivirus installed

Reference