From d68cd6fe0272d261e9f4c0c7c1caeb2a0d99f591 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Tue, 3 Mar 2026 17:13:30 -0500 Subject: [PATCH] Fix var declaration inside begin..end block (Pascal syntax error) Move StepCount to procedure var section. Co-Authored-By: Claude Opus 4.6 --- PrinterInstaller/PrinterInstaller.iss | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/PrinterInstaller/PrinterInstaller.iss b/PrinterInstaller/PrinterInstaller.iss index df602bb..2d9f354 100644 --- a/PrinterInstaller/PrinterInstaller.iss +++ b/PrinterInstaller/PrinterInstaller.iss @@ -913,7 +913,7 @@ var LogDir, LogPath, SummaryMsg: String; InstalledNames: TArrayOfString; DefaultPrinter: String; - AllCount, CleanedCount: Integer; + AllCount, CleanedCount, StepCount: Integer; begin if CurStep <> ssPostInstall then Exit; @@ -938,14 +938,11 @@ begin LogPath := LogDir + '\printer_install.log'; // Initialise progress bar: fixed steps + one per printer being changed - begin - var StepCount: Integer; - StepCount := 4; // cleanup + staging + 2x spooler restart - for I := 0 to GetArrayLength(PrinterDataArray) - 1 do - if PrinterSelectionPage.Values[I] <> PrinterDataArray[I].IsInstalled then - StepCount := StepCount + 1; - SetStatusInit(StepCount); - end; + StepCount := 4; // cleanup + staging + 2x spooler restart + for I := 0 to GetArrayLength(PrinterDataArray) - 1 do + if PrinterSelectionPage.Values[I] <> PrinterDataArray[I].IsInstalled then + StepCount := StepCount + 1; + SetStatusInit(StepCount); // ── Step 0: Remove legacy printers from old print servers ──────────────── SetStatus('Removing legacy printers...');