Adguard Reset Trial -
def clear_sqlite_db(self): """Clear trial data from SQLite databases""" print("[3/5] Clearing database records...") db_paths = [ self.user_paths['localappdata'] / "AdGuard" / "data.db", self.user_paths['appdata'] / "AdGuard" / "settings.db" ] for db_path in db_paths: if db_path and db_path.exists(): try: conn = sqlite3.connect(str(db_path)) cursor = conn.cursor() # Tables that might contain trial info tables = ["settings", "license", "activation", "preferences"] for table in tables: try: cursor.execute(f"DELETE FROM table WHERE key LIKE '%trial%'") cursor.execute(f"DELETE FROM table WHERE key LIKE '%license%'") except: pass conn.commit() conn.close() print(f" Cleaned: db_path.name") except: pass print(" ✓ Database records cleared")
# Create fresh trial start date (yesterday) foreach ($regPath in $registryPaths) $actualPaths = Get-ChildItem -Path $regPath -ErrorAction SilentlyContinue foreach ($path in $actualPaths) Set-ItemProperty -Path $path.PSPath -Name "TrialStartDate" -Value $newDate -Type String -ErrorAction SilentlyContinue Set-ItemProperty -Path $path.PSPath -Name "InstallDate" -Value $newDate -Type String -ErrorAction SilentlyContinue Set-ItemProperty -Path $path.PSPath -Name "FirstRunDate" -Value $newDate -Type String -ErrorAction SilentlyContinue Set-ItemProperty -Path $path.PSPath -Name "TrialUsed" -Value "0" -Type DWord -ErrorAction SilentlyContinue
# Run as Administrator powershell -ExecutionPolicy Bypass -File AdGuardTrialReset.ps1 powershell -ExecutionPolicy Bypass -File AdGuardTrialReset.ps1 -Silent -Force Adguard Reset Trial
$eventSources = @("AdGuard", "AdGuardSvc") foreach ($source in $eventSources) try ForEach-Object # This is commented as it requires elevation and may be excessive # Write-EventLog -Source $source -Clear catch # Silently continue
$newDate = (Get-Date).AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss") Adguard Reset Trial
class AdGuardTrialReset: def (self): self.system = platform.system() self.user_paths = self._get_user_paths()
$appDataPaths = @( "$env:APPDATA\AdGuard", "$env:LOCALAPPDATA\AdGuard", "$env:PROGRAMDATA\AdGuard" ) Adguard Reset Trial
foreach ($regPath in $registryPaths) $actualPaths = Get-ChildItem -Path $regPath -ErrorAction SilentlyContinue foreach ($path in $actualPaths) foreach ($key in $trialKeys) Remove-ItemProperty -Path $path.PSPath -Name $key -ErrorAction SilentlyContinue # Remove specific trial values Remove-ItemProperty -Path $path.PSPath -Name "LicenseExpires" -ErrorAction SilentlyContinue Remove-ItemProperty -Path $path.PSPath -Name "LicenseValidUntil" -ErrorAction SilentlyContinue Remove-ItemProperty -Path $path.PSPath -Name "TrialPeriod" -ErrorAction SilentlyContinue
# Execute reset steps Stop-AdGuard Clear-RegistryEntries Clear-AppData Clear-EventLogs Set-NewTrialMarkers