Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TrayIcon
- #RequireAdmin
- $avp = "AVP21.1"
- If @OSArch = "x64" Then
- $hklm = "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node"
- Else
- $hklm = "HKEY_LOCAL_MACHINE\SOFTWARE"
- EndIf
- RegRead($hklm & "\KasperskyLab", "")
- If @error = 1 Then
- MsgBox(262160, "Kaspersky KAV/KIS/KTS 2021 Trial Reset v21.1", "Can't find the Kaspersky application on this system!")
- Exit
- EndIf
- RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $avp, "")
- If @error = 1 Then
- MsgBox(262160, "Kaspersky KAV/KIS/KTS 2021 Trial Reset v21.1", "Unsupported version of Kaspersky!")
- Exit
- EndIf
- $productname = RegRead($hklm & "\KasperskyLab\" & $avp & "\Data\WSC", "LocalizedProductName")
- If $productname = "Kaspersky Anti-Virus" Then
- $error = 0
- ElseIf $productname = "Kaspersky Internet Security" Then
- $error = 0
- ElseIf $productname = "Kaspersky Total Security" Then
- $error = 0
- Else
- MsgBox(262160, "Kaspersky KAV/KIS/KTS 2021 Trial Reset v21.1", "Unsupported version of Kaspersky!")
- Exit
- EndIf
- $selfdefense = RegRead($hklm & "\KasperskyLab\" & $avp & "\settings", "EnableSelfProtection")
- If $selfdefense = 1 OR ProcessExists("AVP.exe") Then
- MsgBox(262208, "Kaspersky KAV/KIS/KTS 2021 Trial Reset v21.1", "Trial reset procedure:" & @CRLF & "1. Disable Kaspersky Self-Defense." & @CRLF & "2. Close Kaspersky (from the tray)." & @CRLF & "3. Run Kaspersky Trial Reset again." & @CRLF & @CRLF & "Attention! After completing all the necessary steps, the computer will restart automatically!")
- $selfdefense = RegRead($hklm & "\KasperskyLab\" & $avp & "\settings", "EnableSelfProtection")
- If $selfdefense = 1 OR ProcessExists("AVP.exe") Then Exit
- EndIf
- RegDelete($hklm & "\KasperskyLab\LicStrg")
- RegDelete($hklm & "\Microsoft\SystemCertificates\SPC")
- RegDelete($hklm & "\KasperskyLab\" & $avp & "\Data\LicCache")
- RegDelete($hklm & "\KasperskyLab\" & $avp & "\Data\LicensingActivationErrorStorageLogic")
- RegDelete($hklm & "\KasperskyLab\" & $avp & "\Data\UPAO")
- RegWrite($hklm & "\KasperskyLab\" & $avp & "\Data\UPAO", "UpaoState", "REG_DWORD", 1)
- RegWrite($hklm & "\KasperskyLab\" & $avp & "\settings", "EnableSelfProtection", "REG_DWORD", 1)
- RegWrite($hklm & "\KasperskyLab\" & $avp & "\settings", "Ins_InitMode", "REG_DWORD", 1)
- RegWrite($hklm & "\KasperskyLab\" & $avp & "\environment", "ShowActivateTrialOption", "REG_DWORD", 1)
- FileDelete(@AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\cat_engine*")
- FileDelete(@AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\certdb_v2.*.idx")
- If $productname = "Kaspersky Anti-Virus" Then
- FileInstall("bin", @AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\stor_AVP.bin", 1)
- FileInstall("bin", @AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\stor_kav.bin", 1)
- ElseIf $productname = "Kaspersky Internet Security" Then
- FileInstall("bin", @AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\stor_AVP.bin", 1)
- FileInstall("bin", @AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\stor_kis.bin", 1)
- ElseIf $productname = "Kaspersky Total Security" Then
- FileInstall("bin", @AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\stor_AVP.bin", 1)
- FileInstall("bin", @AppDataCommonDir & "\Kaspersky Lab\" & $avp & "\Data\stor_pure.bin", 1)
- EndIf
- MsgBox(262160, "Kaspersky KAV/KIS/KTS 2021 Trial Reset v21.1", "The computer will restart now!")
- Shutdown(6)
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement