| |
Hi Phi Blogs
Scan PC on shutdown using AVG
Some of our clients may not have the latest and greatest machines, but they do what they want for now, except when the virus scanner kicks in for its daily scan and then the computer slows to a crawl. To avoid this problem we decided that the best thing to do is scan when the computer is not being used, but most clients are not willing to leave thier machines on all night for a scan to start.
Best thing is to scan the machine while it is shutting down at the end of the working day. With AVG anti-virus we were able to use the command line scanning in a batch file and run the batch file when the machine shuts down.
We use the following script in a file called AVGscan1.bat
@ECHO OFF ECHO 1. Run AVG. (default) ECHO 2. ShutDown. CHOICE /N /C:12 /T:1,05 Please Choice Shutdown Option IF ERRORLEVEL ==1 GOTO ONE IF ERRORLEVEL ==2 GOTO END :ONE "C:Program FilesAVGAVG8avgscanx.exe" /SCAN=c: /CLEAN /TRASH /EXCLUDE=c:pagefile.sys :END | *Please check the the file path for the avgscanx.exe as they are different between versions. Once the file has been created we save it to the c: and then need to run it on shutdown. You need to do this using the group policy editor by running 'gpedit.msc'
Under Computer Configuation select:
- ‘Windows settings’
- Scripts (startup/shutdown)
- Shutdown (double click)
- Click add and browse to AVGScan1.bat on C-drive
- Click Apply / OK

To be able to interrupt the scan and continue shutdown you also need to do the following in gpedit.
Under Computer Configuation select:
- Admin Templates
- System
- Scripts
- Select Run shutdown scripts visible
- Double Click or Right click & select properties
- Check enabled radio button and click Apply / OK

Close the ‘Group Policy Object Editor’.
That should be all you need to do. To interrupt a scan press Ctrl + C
I suspect that you may be able to do a similar thing with other anti-virus programs which have command line scanning.
This press release was published on 2009-05-26 22:26:59 and last modified on 2009-05-26 22:28:12
|
|
|