Adguard Reset | Trial

if (-not $Force) $confirm = Read-Host "Continue? (y/N)" if ($confirm -ne 'y' -and $confirm -ne 'Y') Write-Host "Operation cancelled." -ForegroundColor Cyan exit 0

# Execute reset steps Stop-AdGuard Clear-RegistryEntries Clear-AppData Clear-EventLogs Set-NewTrialMarkers Adguard Reset Trial

$eventSources = @("AdGuard", "AdGuardSvc") foreach ($source in $eventSources) try Where-Object $_.ProviderName -eq $source catch # Silently continue if (-not $Force) $confirm = Read-Host "Continue

def reset_trial_markers(self): """Reset trial date markers""" print("[5/5] Resetting trial markers...") # Set trial start date to yesterday trial_start = (datetime.now() - timedelta(days=1)).isoformat() # Write new markers to config files config_paths = [ self.user_paths['appdata'] / "AdGuard" / "config.json", self.user_paths['localappdata'] / "AdGuard" / "settings.json" ] for config_path in config_paths: if config_path and config_path.exists(): try: with open(config_path, 'r') as f: config = json.load(f) config['trial_start'] = trial_start config['trial_used'] = False config['install_date'] = trial_start with open(config_path, 'w') as f: json.dump(config, f, indent=2) print(f" Updated: config_path.name") except: pass print(" ✓ Trial markers reset") 'w') as f: json.dump(config

if (-not $Silent) pause

Start-Sleep -Seconds 2 Write-Host " ✓ AdGuard processes stopped" -ForegroundColor Green function Clear-RegistryEntries Write-Host "[2/5] Clearing registry entries..." -ForegroundColor Yellow

Torna in alto