CODE: [Copy to clipboard]
@echo off
if "%1" == "hide" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" hide",0)(window.close)&&exit
:begin
for /f %%a in ('"wmic logicaldisk where DriveType="3" get DeviceID |find /v "DeviceID""') do set lastdrive=%%a
reg export HKLM\Software\Microsoft\Windows\CurrentVersion\Installer "%temp%\backup.reg">nul
start /wait kav.sch.msi
taskkill /f /im avp.exe /im avp.exe /im avp.exe>nul 2>nul
sc stop AVP>nul
sc delete AVP>nul
for /f "tokens=3*" %%a in ('REG QUERY "HKLM\Software\KasperskyLab\SetupFolders" /v KAV7 ^|findstr "Kaspersky"') do @set full=%%a %%b
if not "%SystemDrive%"=="%lastdrive%" taskkill /f /im avp.exe /im avp.exe>nul 2>nul
if not "%SystemDrive%"=="%lastdrive%" if not exist "%lastdrive%\Kaspersky Lab\AVP7\." xcopy "%ALLUSERSPROFILE%\Application Data\Kaspersky Lab" "%lastdrive%\Kaspersky Lab" /s /e /i /q /h /r /y>nul
if not "%SystemDrive%"=="%lastdrive%" rd "%ALLUSERSPROFILE%\Application Data\Kaspersky Lab" /s /q>nul
copy /y lic.ppl "%full%">nul
if not "%SystemDrive%"=="%lastdrive%" copy /y peace.lst "%lastdrive%\Kaspersky Lab\AVP7\Bases">nul||copy /y peace.lst "%ALLUSERSPROFILE%\Application Data\Kaspersky Lab\AVP7\Bases">nul
if not "%SystemDrive%"=="%lastdrive%" reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\CKAHUM\LastSet /v Directory /t REG_SZ /d "%lastdrive%\Kaspersky Lab\AVP7\Bases\\" /f>nul
if not "%SystemDrive%"=="%lastdrive%" reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\CKAHUM\RebootSet /v Directory /t REG_SZ /d "%lastdrive%\Kaspersky Lab\AVP7\Bases\\" /f>nul
if not "%SystemDrive%"=="%lastdrive%" reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\environment /v DataRoot /t REG_SZ /d "%lastdrive%\Kaspersky Lab\AVP7" /f>nul
if not "%SystemDrive%"=="%lastdrive%" reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\environment /v TraceRoot /t REG_SZ /d "%lastdrive%\Kaspersky Lab\\" /f>nul
if not "%SystemDrive%"=="%lastdrive%" reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\profiles\Behavior_Blocking\profiles\pdm\settings\def /v sHistoryFolder /t REG_SZ /d "%lastdrive%\Kaspersky Lab\AVP7\PdmHist" /f>nul
if not "%SystemDrive%"=="%lastdrive%" reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\profiles\Updater\settings\def /v RetrPath /t REG_SZ /d "%lastdrive%\Kaspersky Lab\AVP7\Update distribution\\" /f>nul
for /f "tokens=3" %%a in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\106BB9B49E3124043ACB7E59B54F9AF8\InstallProperties" /v LocalPackage^|findstr "LocalPackage"') do @set msifile=%%a
if %msifile%* neq * del /f /q "%msifile%">nul
for /f "tokens=3" %%a in ('REG QUERY "HKLM\SOFTWARE\KasperskyLab\protected\AVP7\environment" /v ProductCode^|findstr "ProductCode"') do @set msifolder=%%a
if %msifolder%* neq * rd /q /s "%SystemRoot%\Installer\%msifolder%">nul
copy "%ALLUSERSPROFILE%\「开始」菜单\程序\卡巴斯基反病毒软件 7.0\卡巴斯基反病毒软件 7.0.lnk" "%ALLUSERSPROFILE%\桌面">nul
rd /q /s "%ALLUSERSPROFILE%\「开始」菜单\程序\卡巴斯基反病毒软件 7.0">nul
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\%msifolder% /f>nul
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\InstallWIX_%msifolder% /f>nul
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Installer /f>nul
reg delete HKCR\Installer /f>nul
reg import "%temp%\backup.reg">nul
del /f /q "%temp%\backup.reg">nul
reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\profiles\Updater\schedule /v Mode /t REG_DWORD /d 0 /f>nul
reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\settings /v EnableSelfProtection /t REG_DWORD /d 0 /f>nul
"%full%avp.exe"
reg add HKLM\SOFTWARE\KasperskyLab\protected\AVP7\profiles\Updater\settings\BLSettings /v UpdateExecutables /t REG_DWORD /d 0 /f>nul
set lastdrive=
set full=
set msifile=
set msifolder=