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...');