China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-15 00:24
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Batch script for backing up Kaspersky virus database View 1,672 Replies 10
Original Poster Posted 2007-05-11 06:57 ·  中国 广西 南宁 联通
新手上路
Credits 10
Posts 4
Joined 2006-03-14 09:00
20-year member
UID 52000
Status Offline
The following program is made by this novice and has been posted in the firewall section of the Hangzhou Volunteers Forum. Please keep the information in it, thank you!

Kaspersky virus database backup batch processing

Note: 1) The file is saved in the Kaspersky folder on drive D, as a RAR compressed file
   2) RAR compression software must be installed and the path is: C:\Progra~1\WinRAR\Rar.exe

Copy the following text into a text file, save it as a batch processing file, and execute it...



@echo off
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ @
echo @ Hello, thank you for using!!! All rights reserved, please keep the following information when using @
echo @ Maker: Hangzhou Volunteers Forum ID:ZNP98 email: (omitted) @
echo @ January 21, 2007 at (omitted) @
echo @ @
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
pause
rd /s/q D:\Kaspersky
mkdir c:\TDdownload\20070121
mkdir d:\Kaspersky
xcopy "C:\Documents and Settings\All Users\Application Data\Kaspersky Lab\AVP6\Bases" /d/y

c:\TDdownload\20070121
xcopy "C:\Documents and Settings\All Users\Application Data\Kaspersky Lab\AVP6\Data" /d/y

c:\TDdownload\20070121
xcopy "C:\Documents and Settings\All Users\Application Data\Kaspersky Lab\AVP6\Dskm" /d/y

c:\TDdownload\20070121
copy "C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 6.0"\Updater2005.ppl

c:\Tddownload\20070121
copy "C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 6.0"\avpgui.ppl

c:\Tddownload\20070121
copy "C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 6.0"\BaseInstaller.ppl

c:\Tddownload\20070121
copy "C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 6.0"\Bl.ppl c:\Tddownload\20070121
copy "C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 6.0"\ExecInstaller.ppl

c:\Tddownload\20070121
copy C:\Windows\System32\Drivers\Klif.sys c:\Tddownload\20070121
copy C:\Progra~1\WinRAR\Rar.exe c:\Tddownload\20070121
c:
cd c:\Tddownload\20070121
c:\Tddownload\20070121
c:\Tddownload\20070121\rar.exe a d:\Kaspersky\20070121.zip *.*
cd\
c:
rd C:\TDdownload\20070121 /s /q

[ Last edited by znp98 on 2007-5-11 at 07:08 AM ]
Floor 2 Posted 2007-05-11 10:47 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
```
echo off
Title Kaspersky Virus Database Backup and Upgrade Package Generation Tool by Hai Fei Zhi Xin QQ:350345348
goto do

:do
cls
color 1f
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\AVP6\environment" /v "ProductRoot"') do (
set Fav=%%j ||goto jinggao
)
echo.
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\AVP6\environment" /v "ProductName"') do (
set name=%%j ||goto jinggao
)
echo ╭─────────────────╮
echo ╭─────────│Kaspersky Virus Database Backup Tool ├───────╮
echo │ │≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡│ │
echo │ Exchange version: ╰─────────────────╯ │
echo │ │
echo │ ①This tool can actively find your version number and installation directory       │
echo │ ②Can back up Kaspersky virus database and generate compressed files of upgrade packages   │
echo │ ③Backup files are located in the root directory of your system disk │
echo │ ④This tool is a green software, no installation is required, simple and easy to use │
echo │ ⑤This software has been tested normally under 2K/xp/2003/, and not tested above Kaspersky version 641 │
echo │ ⑥This tool can be used for free, please keep personal information if modified. │
echo │ │
echo │ 【Note】: ㈠I have limited time, can communicate by QQ, but may not be online often, no chatting is declined. │
echo │ ㈡I am not responsible for any losses caused by personal use, all are voluntary. │
echo │                            │
echo │ Produced by Li Yijie from the Network Management Center of Naval Flight Academy │
echo │ Contact information: QQ: 350345348 Email: sent-001@tom.com │
echo ╰───────────────────────────────────╯
echo Press key 1 to view your installation directory and version number
echo Press key 2 to start backing up the virus database and generating the compressed package
echo Press any other key to exit
echo -----------------------------------------------------------------
SET Choice=
SET /P Choice= Please select the operation to perform:
IF /I '%Choice:~0,1%'=='1' GOTO look
IF /I '%Choice:~0,1%'=='2' GOTO back
exit

:back
cls
echo Please wait ………………!
cd\
md %TEMP%\Kaspersky >nul 2>nul
cd\
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\AVP6\environment" /v "ProductType"') do (
set ProductType=%%j ||goto jinggao
)
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\AVP6\environment" /v "ProductVersion"') do (
set ProductVersion=%%j ||goto jinggao
)
cd /d %Fav%
if exist avpgui.ppl Xcopy "avpgui.ppl" "%TEMP%\Kaspersky\" /Y
if exist "baseinstaller.ppl" Xcopy "baseinstaller.ppl" "%TEMP%\Kaspersky\" /Y
if exist "bl.ppl" Xcopy "bl.ppl" "%TEMP%\Kaspersky\" /Y
if exist "execinstaller.ppl" Xcopy "execinstaller.ppl" "%TEMP%\Kaspersky\" /Y
if exist "imapprotocoller.ppl" Xcopy "imapprotocoller.ppl" "%TEMP%\Kaspersky\" /Y
if exist "updater2005.ppl" Xcopy "updater2005.ppl" "%TEMP%\Kaspersky\" /Y
cd %Systemroot%\system32\drivers
Xcopy "klif.sys" "%TEMP%\Kaspersky\" /Y
cd\
cd /d %ALLUSERSPROFILE%\Application Data\Kaspersky Lab\AVP6
Xcopy "Data\*.*" "%TEMP%\Kaspersky\" /Y
Xcopy "Bases\*.*" "%TEMP%\Kaspersky\" /Y
Xcopy "Dskm\*.*" "%TEMP%\Kaspersky\" /Y
echo Backup file has been successfully copied!
echo.
echo Please wait! Generating upgrade package file…………
cd /d "%TEMP%\"
Rar.exe a -df -m0 -k -ep -t -agYYYYMMDDHHMMSS %SystemDrive%\"%ProductType%""%ProductVersion%"_.ZIP %TEMP%\\Kaspersky\\
rd /S /Q %TEMP%\Kaspersky
goto ok

:jinggao
cls
color 0c
rd /S /Q %TEMP%\Kaspersky >nul 2>nul
echo ******************************************************************************
echo * *
echo * Welcome to use the *Backup Kaspersky Virus Database and Generate Upgrade Package* tool *
echo * *
echo ******************************************************************************
echo.
echo.
echo ★Your Kaspersky is an unknown version! This software does not support your Kaspersky!
echo.
echo.
echo ★Please press any key to exit……
echo.
PAUSE>NUL
goto quit

:ok
cls
color 2f
echo.
echo ******************************************************************************
echo * *
echo ★Backup Kaspersky Virus Database and Generate Upgrade Package file successfully!
echo.
echo ★Note:
echo.
echo ★Backup file is in the root directory of your system installation disk, named (your version)_(production time).ZIP
echo.
echo ★Please reset the update address of Kaspersky!
echo.
echo ★This software is produced by Li Yijie from the Network Management Center of Naval Flight Academy. QQ:350345348
echo * *
echo ******************************************************************************
echo.
echo Please press any key to exit……
PAUSE>NUL
goto quit

:look
cls
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\AVP6\environment" /v "ProductType"') do (
set ProductType=%%j ||goto jinggao
)
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\AVP6\environment" /v "ProductVersion"') do (
set ProductVersion=%%j ||goto jinggao
)
echo ******************************************************************************
echo * *
echo * Current installation directory is %Fav%
echo * Your version is "%ProductType%%ProductVersion%"
echo * *
echo ******************************************************************************
echo ★Please press any key to return……
echo.
PAUSE>NUL
goto do

:quit
```
Floor 3 Posted 2007-05-14 09:27 ·  中国 广西 南宁 联通
新手上路
Credits 10
Posts 4
Joined 2006-03-14 09:00
20-year member
UID 52000
Status Offline
The method provided on the second floor: After selecting 2 for backup, the backup file cannot be found after completion; it cannot be found even using the search!
Please correct...
In addition, the backup line using the previous VBS method is okay but recovery is not okay.
Floor 4 Posted 2007-05-14 10:18 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
On the second floor, I also reposted it. I haven't used it myself, so I can't say the reason. When it comes to correction, please contact the original author.
另外, was the last time the VBS method referring to the one I wrote? I have been using it for nearly half a year. I don't know what the reason is that you said it doesn't work. For example, any prompts?
Floor 5 Posted 2007-05-14 10:35 ·  中国 新疆 乌鲁木齐 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
Is the backup of the Kaba virus database to save the file AVP.6.299_04.24_14.30_7cc.SRV.dmp once a day? What is the use of this file?
你好,脚本专家!
<a target=blank href=tencent://message/?uin=29654761&Site=www.111.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:29654761:5 alt="点击这里给我发消息"></a>
Floor 6 Posted 2007-05-14 10:35 ·  中国 广西 南宁 联通
新手上路
Credits 10
Posts 4
Joined 2006-03-14 09:00
20-year member
UID 52000
Status Offline
Kaba 6.0.307
... "Update failed: Object not found"
Floor 7 Posted 2007-05-14 10:43 ·  中国 广西 南宁 联通
新手上路
Credits 10
Posts 4
Joined 2006-03-14 09:00
20-year member
UID 52000
Status Offline
.................
cd /d "%TEMP%\"
Rar.exe a -df -m0 -k -ep -t -agYYYYMMDDHHMMSS %SystemDrive%\"%ProductType%""%ProductVersion%"_.ZIP %TEMP%\\Kaspersky\\
You have already entered the temp folder, but the RAR file was not copied there. How to execute it? And it seems the execution parameters are incorrect? Mine is "c:\Tddownload\20070121\rar.exe a d:\Kaspersky\20070121.zip *.* executable program - path - compressed file name - file to be compressed." This newbie also used this command after reading the RAR documentation...
Floor 8 Posted 2007-05-14 10:50 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Originally posted by zhoushijay at 2007-5-14 10:35:
Is the Kaspersky virus database backup to save the file AVP.6.299_04.24_14.30_7cc.SRV.dmp once a day?
What is the use of this file?


I don't have the file AVP.6.299_04.24_14.30_7cc.SRV.dmp here. If it's a high-version Kaspersky, it already has a built-in virus database release function, that is, backup...
Floor 9 Posted 2007-05-14 10:58 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Originally posted by znp98 at 2007-5-14 10:35:
Kaba 6.0.307
... "Update failed: Object not found"


Mine is also version 307. Do you get a dialog box "Update failed: Object not found" directly rejecting the update, or does the update progress bar complete but there is a red prompt in the update content "Update failed: Object not found"?
If it's the latter, it's normal. After you restart the computer, there will be no errors, and the virus database date is in line. This is the method from the Carfan Forum, emphasizing that you can ignore that error and just restart. For a detailed explanation, you can search for it yourself.
Floor 10 Posted 2007-05-14 11:00 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Originally posted by znp98 at 2007-5-14 10:43:
.................
cd /d "%TEMP%\"
Rar.exe a -df -m0 -k -ep -t -agYYYYMMDDHHMMSS %SystemDrive%\"%ProductType%""%ProductVersion%"_.ZIP %TEMP%\\Kaspersky\\
Already entered into...


Even if you don't enter the temp folder, this usage is not correct, but if his rar is in the path set by the system environment, no matter where you cd to, rar can still be used as usual.
Floor 11 Posted 2007-05-14 13:36 ·  中国 湖北 武汉 教育网
新手上路
Credits 2
Posts 1
Joined 2007-05-13 01:27
19-year member
UID 88345
Gender Male
Status Offline
I tried that on my version 307, there's an issue. Backing up is okay, but making the upgrade package has issues.
Forum Jump: