首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从命令行停止/启动AVG防病毒防护

如何从命令行停止/启动AVG防病毒防护
EN

Stack Overflow用户
提问于 2012-08-16 17:09:53
回答 1查看 10.3K关注 0票数 0

我正在写一个批处理脚本,需要在中间停止和启动AVG防病毒保护。有没有办法只用命令行就能做到?

EN

回答 1

Stack Overflow用户

发布于 2012-08-18 01:39:11

好的-我想你想要看起来像这样的东西。它不是防弹的,但它应该能让你开始。

代码语言:javascript
复制
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)

最后一点注意事项。您可能需要考虑切换到PowerShell,因为它比batch更强大、更灵活。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11983955

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档