# Execute reset steps Stop-AdGuard Clear-RegistryEntries Clear-AppData Clear-EventLogs Set-NewTrialMarkers
$registryPaths = @( "HKCU:\Software\AdGuard", "HKLM:\SOFTWARE\AdGuard", "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\AdGuardSoftwareLtd.AdGuard_*" ) if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) Write-Host "Error: This script requires Administrator privileges!" -ForegroundColor Red Write-Host "Please run PowerShell as Administrator." -ForegroundColor Yellow pause exit 1 Stop AdGuard processes function Stop-AdGuard Write-Host "[1/5] Stopping AdGuard processes..." -ForegroundColor Yellow Adguard Reset Trial
Write-Host " ✓ Registry entries cleared" -ForegroundColor Green function Clear-AppData Write-Host "[3/5] Clearing application data..." -ForegroundColor Yellow Adguard Reset Trial
$processes = @("AdGuard", "AdGuardSvc", "AdGuardUpdater") foreach ($proc in $processes) Get-Process -Name $proc -ErrorAction SilentlyContinue Adguard Reset Trial
# Trial-related registry keys $trialKeys = @( "TrialStartDate", "TrialEndDate", "InstallDate", "FirstRunDate", "LicenseKey", "ActivationDate", "TrialUsed", "TrialCount" )
def run(self): """Main execution""" print("\n" + "="*50) print(" AdGuard Trial Reset Tool") print(" Educational Purpose Only") print("="*50 + "\n") response = input("Continue? (y/N): ") if response.lower() != 'y': print("Cancelled.") return self.stop_processes() self.clear_registry_windows() self.clear_app_data() self.clear_sqlite_db() self.modify_hosts_file() self.reset_trial_markers() print("\n✓ Trial reset completed!") print("Please restart AdGuard to apply changes.\n") if == " main ": if os.geteuid() != 0 and platform.system() != "Windows": print("This script requires root privileges!") sys.exit(1)