Windows 如何从命令行停止/启动AVG防病毒保护 我正在编写一个需要停止的批处理脚本,然后在中间启动AVG反病毒保护。 有没有办法只使用命令行就可以做到这一点?

Windows 如何从命令行停止/启动AVG防病毒保护 我正在编写一个需要停止的批处理脚本,然后在中间启动AVG反病毒保护。 有没有办法只使用命令行就可以做到这一点?,windows,batch-file,command-line,antivirus,Windows,Batch File,Command Line,Antivirus,好的-我想您需要这样的东西。它不是防弹的,但它应该让你开始 Set myshell = WScript.CreateObject("WScript.Shell") Dim cmd REM Do your pre-AVG-stop commands here REM Now stop AVG using the 'taskkill' command. Note that this command assumes REM that the name of the process is "av

好的-我想您需要这样的东西。它不是防弹的,但它应该让你开始

Set myshell = WScript.CreateObject("WScript.Shell")
Dim cmd

REM Do your pre-AVG-stop commands here

REM Now stop AVG using the 'taskkill' command.  Note that this command assumes 
REM that the name of the process is "avgscanx".  You should verify that is true.
REM You also may need to play around with the parameters for 'taskkill'.  Run
REM 'taskkilll /?' in a cmd window to see the various options.  You may also want
REM to add some code to verify that taskkill was successful.

taskkill /IM "avgscanx"

REM Do your post-AVG-stop commands here.

REM Now, let's restart AVG.
REM Modify the command line below for your specific use of AVG.
REM And, again, you may want to add some code to verify that AVG started.

cmd = """avgscanx"" /parameter1 /parameter2 /etc"
myshell.Run(cmd,0,true)

最后一个音符。你可能想考虑切换到PuxBeSE,因为它比批次更强大和灵活。

当你说“在中间”时,你的意思是什么?我想当你说“停止”时,你的意思是退出应用程序。是吗?您是否希望使用某个事件触发停止,或者这只是用户的选择?开始问同样的问题。嗨,大卫,10倍于你的回答。我的脚本执行一些命令,然后我需要停止AVG,再执行一些命令,然后再次启动AVG。我的脚本正在使用CPU和内存负载,我需要停止所有后台消耗程序。在AVG中,有一个选项“临时禁用保护”,使应用程序本身保持运行。您是要切换此选项还是要完全终止应用程序?10倍David。我在命令taskill之前尝试了avg进程-它拒绝停止。此外,我试图将服务更改为手动,然后停止它-它也失败了。似乎所有常规选项都被阻止:-(您确认该进程的名称为“avgscanx”了吗?这只是我在阅读AVG帮助文档的基础上的猜测。您也可以尝试
taskkill/F/IM“avgscanx”/T
哪一个更具攻击性。另外,AVG是否以与脚本相同的用户凭据运行?如果不是,则需要说明“taskkill”的一些附加参数。