From a73c3129f0a42103ea6a52b40a333d6de4f2bcce Mon Sep 17 00:00:00 2001 From: Erik Barale Date: Mon, 4 Nov 2024 16:01:55 +0100 Subject: [PATCH 1/5] basics for update-repair features --- InfluxWindowsInstaller.iss | 136 ++++++++++++++++++++++++++----------- README.md | 1 + download_sources.ps1 | 38 ++++++++--- 3 files changed, 126 insertions(+), 49 deletions(-) diff --git a/InfluxWindowsInstaller.iss b/InfluxWindowsInstaller.iss index 3d861a4..210e37b 100644 --- a/InfluxWindowsInstaller.iss +++ b/InfluxWindowsInstaller.iss @@ -1,7 +1,7 @@ +#define AppId "225E5AB3-F87B-4C34-A34E-9F655DF12C4E" #define ServiceName "InfluxDBService" #define AppTitle "InfluxDB OSS" #define AppVer "2.7.10" -#define DefaultDir "InfluxDB" #define SourceInfluxDir ".\InfluxDB_bin" #define SourceShawlDir ".\Shawl_bin" #define OutputFolder ".\dist" @@ -10,13 +10,14 @@ #define OutputInfluxExecutable "{app}\influxd.exe" [Setup] +AppId={#AppId} AppName={#AppTitle} AppVersion={#AppVer} -DefaultDirName={autopf}\{#DefaultDir} +DefaultDirName={autopf}\{#AppTitle} DefaultGroupName={#AppTitle} UninstallDisplayIcon=.\Assets\influxdb.ico OutputDir={#OutputFolder} -OutputBaseFilename={#AppTitle}_Installer +OutputBaseFilename={#AppTitle}-{#AppVer}-setup Compression=lzma WizardStyle=modern SolidCompression=yes @@ -29,23 +30,78 @@ WizardImageFile=.\Assets\influxdb_large.bmp WizardSmallImageFile=.\Assets\influxdb_small.bmp [Files] -Source: "{#SourceInfluxDir}\*"; DestDir: "{app}\"; Flags: ignoreversion -Source: "{#SourceShawlDir}\*"; DestDir: "{app}\Shawl\"; Flags: ignoreversion -Source: "{#SourceShawlDir}\{#OutputShawlLicense}"; DestDir: "{app}\Shawl\"; Flags: ignoreversion +Source: "{#SourceInfluxDir}\*"; DestDir: "{app}\"; +Source: "{#SourceShawlDir}\*"; DestDir: "{app}\Shawl\"; +Source: "{#SourceShawlDir}\{#OutputShawlLicense}"; DestDir: "{app}\Shawl\"; + +[Tasks] +Name: "service_auto"; Description: "Register the service in automatic startup"; GroupDescription: "Service Configuration:"; Flags: exclusive +Name: "service_manual"; Description: "Register the service in manual startup"; GroupDescription: "Service Configuration:"; Flags: unchecked exclusive +Name: "service_start"; Description: "Start the service immediately"; GroupDescription: "Service Startup:"; [Run] -Filename: "{#OutputShawlExecutable}"; Parameters: "add --name {#ServiceName} -- ""{#OutputInfluxExecutable}"""; WorkingDir: "{app}"; StatusMsg: "Registering {#ServiceName} service..."; Check: ServiceRegistrationCheck; Flags: shellexec runhidden waituntilterminated +Filename: "{#OutputShawlExecutable}"; Parameters: "add --name {#ServiceName} -- ""{#OutputInfluxExecutable}"""; WorkingDir: "{app}"; StatusMsg: "Registering {#ServiceName} service..."; AfterInstall: ServiceRegistration; Flags: shellexec runhidden waituntilterminated [UninstallRun] Filename: "sc.exe"; Parameters: "delete {#ServiceName}"; Flags: runhidden; RunOnceId: "Remove{#ServiceName}" +[UninstallDelete] +Type: filesandordirs; Name: "{app}" + [Code] var SecondLicensePage: TOutputMsgMemoWizardPage; License2AcceptedRadio: TRadioButton; License2NotAcceptedRadio: TRadioButton; - StartServicePage: TInputOptionWizardPage; ErrorCode: Integer; + IsUpdating: Boolean; + IsRepairing: Boolean; + +procedure UpdatePageTextsForRepair(); +begin + if IsRepairing then + begin + // Modify welcome page texts + WizardForm.WelcomeLabel1.Caption := 'Riparazione di {#AppTitle}'; + WizardForm.WelcomeLabel2.Caption := 'L installazione rileva che questa versione è già presente. Proseguirà in modalità riparazione.'; + + // Customize other page titles and descriptions + WizardForm.PageTitles[wpSelectDir] := 'Seleziona la cartella di riparazione'; + WizardForm.PageDescriptions[wpSelectDir] := 'Seleziona la cartella in cui è già installato {#AppTitle} per continuare con la riparazione.'; + + WizardForm.PageTitles[wpSelectProgramGroup] := 'Configura gruppo di programmi per riparazione'; + WizardForm.PageDescriptions[wpSelectProgramGroup] := 'Scegli il gruppo di programmi in cui verranno aggiornati i collegamenti per {#AppTitle}.'; + + WizardForm.PageTitles[wpReady] := 'Pronto per la riparazione'; + WizardForm.PageDescriptions[wpReady] := 'Il programma è pronto per riparare {#AppTitle}. Fai clic su Avanti per continuare.'; + end; +end; + +function InitializeSetup: Boolean; +var + Version: String; +begin + IsUpdating := False; + IsRepairing := False; + Result := True; + if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#AppId}_is1', 'DisplayVersion') then + begin + RegQueryStringValue(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#AppId}_is1', 'DisplayVersion', Version); + if Version = '{#AppVer}' then + begin + IsRepairing := True; + end + else if Version > '{#AppVer}' then + begin + MsgBox(ExpandConstant('A newer version of {#AppTitle} is already installed. Installer version: {#AppVer}. Current version: ' + Version + '.'), mbInformation, MB_OK); + Result := False; + end + else + begin + IsUpdating := True; + end; + end; +end; procedure CheckLicense2Accepted(Sender: TObject); begin @@ -82,60 +138,60 @@ begin License2AcceptedRadio := CloneLicenseRadioButton(WizardForm.LicenseAcceptedRadio); License2NotAcceptedRadio := CloneLicenseRadioButton(WizardForm.LicenseNotAcceptedRadio); License2NotAcceptedRadio.Checked := True; - - StartServicePage := CreateInputOptionPage( - wpSelectTasks, - 'Service Startup', - 'How do you want to register the InfluxDB service?', - 'Check the boxes to select the ways you want to start the service.', - False, - False - ); - - StartServicePage.AddEx('Manual', 0, True); - StartServicePage.AddEx('Automatic (delayed stard)', 0, True); - StartServicePage.Add('Start the service immediately'); - StartServicePage.Values[1] := True; - StartServicePage.Values[2] := True; end; procedure CurPageChanged(CurPageID: Integer); begin if CurPageID = SecondLicensePage.ID then - begin CheckLicense2Accepted(nil); - end; end; -function ServiceRegistrationCheck: Boolean; +function ShouldSkipPage(PageID: Integer): Boolean; begin - try - Result := True; - if StartServicePage.Values[1] then + Result := ((PageID = wpSelectTasks) or (PageID = wpReady))and IsUpdating; + Log('coa') +end; + +procedure ServiceRegistration(); +var + CanContinue: Boolean; +begin + CanContinue := not IsUpdating; + if CanContinue then + begin + if WizardIsTaskSelected('service_auto') then begin if not ShellExec('', 'sc.exe', 'config {#ServiceName} start= delayed-auto', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then begin - MsgBox('Error: Unable to register the service in automatic (delayed stard) mode. Please try from the Windows services manager.', mbError, MB_OK); - Result := False; - end; + MsgBox('Error: Unable to set the service to automatic (delayed start). Please try from the Windows services manager.', mbError, MB_OK); + CanContinue := False; + end end - else + else if WizardIsTaskSelected('service_manual') then begin if not ShellExec('', 'sc.exe', 'config {#ServiceName} start= demand', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then begin - MsgBox('Error: Unable to register the service in manual mode. Please try from the Windows services manager.', mbError, MB_OK); - Result := False; + MsgBox('Error: Unable to set the service to manual. Please try from the Windows services manager.', mbError, MB_OK); + CanContinue := False; end; end; - if StartServicePage.Values[2] and Result then + if WizardIsTaskSelected('service_start') and CanContinue then + begin if not ShellExec('', 'sc.exe', 'start {#ServiceName}', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then begin MsgBox('Error: Unable to start the service. Please try from the Windows services manager.', mbError, MB_OK); - Result := False; + CanContinue := False; end; - except - MsgBox('Error: An error occurred while registering the service.', mbError, MB_OK); - Result := False; + end; + end; +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + if CurUninstallStep = usUninstall then + begin + if not ShellExec('', 'sc.exe', 'stop {#ServiceName}', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then + MsgBox('Error: Unable to stop the service. Please try from the Windows services manager.', mbError, MB_OK); end; end; diff --git a/README.md b/README.md index 55cec10..324252d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # InfluxDB Windows Installer 🚀 +InfluxDB Windows Installer is a Windows installer created with Inno Setup that installs and registers InfluxDB OSS V2 as a Windows service, using Shawl as a wrapper for simplified management. **Disclaimer:** This software is not affiliated in any way with the producers of InfluxDB. It is a third-party tool designed to simplify the installation of InfluxDB. All logos, texts, and programs used are the property of InfluxDB and were taken and possibly modified from the official repository [here](https://github.com/influxdata/influxdb), which is licensed under MIT. diff --git a/download_sources.ps1 b/download_sources.ps1 index c2e787a..89c8f37 100644 --- a/download_sources.ps1 +++ b/download_sources.ps1 @@ -17,9 +17,9 @@ New-Item -ItemType Directory -Path $influxDbDir New-Item -ItemType Directory -Path $shawlDir # Download URLs -$influxDbUrl = "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.10-windows.zip" # Change to the latest version -$shawlReleaseUrl = "https://github.com/mtkennerly/shawl/releases/download/v1.5.1/shawl-v1.5.1-win64.zip" # Change to the correct URL -$shawlSourceUrl = "https://github.com/mtkennerly/shawl/archive/refs/tags/v1.5.1.zip" # Change to the correct URL if needed +$influxDbUrl = "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.10-windows.zip" +$shawlReleaseUrl = "https://github.com/mtkennerly/shawl/releases/download/v1.5.1/shawl-v1.5.1-win64.zip" +$shawlSourceUrl = "https://github.com/mtkennerly/shawl/archive/refs/tags/v1.5.1.zip" # Define file paths $influxDbZip = "$influxDbDir\influxdb.zip" @@ -27,27 +27,47 @@ $shawlReleaseZip = "$shawlDir\shawl_release.zip" $shawlSourceZip = "$shawlDir\shawl_source.zip" # Function to download files with progress -function Download-WithProgress { +function Get-FileWithProgress { param ( [string]$url, [string]$outputPath ) + # Initialize the WebClient $webClient = New-Object System.Net.WebClient + # Define the event handler for progress + $ProgressChanged = { + param ($sender, $e) + Write-Progress -Activity "Downloading $url" -Status "$($e.ProgressPercentage)% Complete" -PercentComplete $e.ProgressPercentage + } + + # Attach the event handler + $webClient.DownloadProgressChanged.Add($ProgressChanged) + # Start the download Write-Host "Downloading $url..." - $webClient.DownloadFile($url, $outputPath) + $webClient.DownloadFileAsync([Uri]$url, $outputPath) + + # Wait for download to complete + while ($webClient.IsBusy) { + Start-Sleep -Milliseconds 100 + } + + # Clean up the event handler and dispose of the WebClient + $webClient.DownloadProgressChanged.Remove($ProgressChanged) + $webClient.Dispose() + Write-Progress -Activity "Download" -Completed } # Start download jobs with progress reporting -Download-WithProgress -url $influxDbUrl -outputPath $influxDbZip +Get-FileWithProgress -url $influxDbUrl -outputPath $influxDbZip Write-Host "InfluxDB download complete." -Download-WithProgress -url $shawlReleaseUrl -outputPath $shawlReleaseZip +Get-FileWithProgress -url $shawlReleaseUrl -outputPath $shawlReleaseZip Write-Host "Shawl release download complete." -Download-WithProgress -url $shawlSourceUrl -outputPath $shawlSourceZip +Get-FileWithProgress -url $shawlSourceUrl -outputPath $shawlSourceZip Write-Host "Shawl source code download complete." # Extract InfluxDB @@ -60,7 +80,7 @@ Expand-Archive -Path $shawlReleaseZip -DestinationPath $shawlDir Expand-Archive -Path $shawlSourceZip -DestinationPath $shawlDir # Move the LICENSE file to the Shawl_bin directory and rename it to LICENSE2 -$licenseFile = "$shawlDir\shawl-1.5.1\LICENSE" # Adjust according to the extracted folder structure +$licenseFile = "$shawlDir\shawl-1.5.1\LICENSE" if (Test-Path $licenseFile) { Rename-Item -Path $licenseFile -NewName "LICENSE2" Move-Item -Path "$shawlDir\shawl-1.5.1\LICENSE2" -Destination $shawlDir From de06fcd5ee18ec5163de967f9c01c7dcaefca302 Mon Sep 17 00:00:00 2001 From: b-erik99 Date: Tue, 5 Nov 2024 10:29:08 +0100 Subject: [PATCH 2/5] Merge download file from dev --- download_sources.ps1 | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/download_sources.ps1 b/download_sources.ps1 index 89c8f37..b4c66b4 100644 --- a/download_sources.ps1 +++ b/download_sources.ps1 @@ -17,9 +17,9 @@ New-Item -ItemType Directory -Path $influxDbDir New-Item -ItemType Directory -Path $shawlDir # Download URLs -$influxDbUrl = "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.10-windows.zip" -$shawlReleaseUrl = "https://github.com/mtkennerly/shawl/releases/download/v1.5.1/shawl-v1.5.1-win64.zip" -$shawlSourceUrl = "https://github.com/mtkennerly/shawl/archive/refs/tags/v1.5.1.zip" +$influxDbUrl = "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.10-windows.zip" # Change to the latest version +$shawlReleaseUrl = "https://github.com/mtkennerly/shawl/releases/download/v1.5.1/shawl-v1.5.1-win64.zip" # Change to the correct URL +$shawlSourceUrl = "https://github.com/mtkennerly/shawl/archive/refs/tags/v1.5.1.zip" # Change to the correct URL if needed # Define file paths $influxDbZip = "$influxDbDir\influxdb.zip" @@ -33,41 +33,21 @@ function Get-FileWithProgress { [string]$outputPath ) - # Initialize the WebClient $webClient = New-Object System.Net.WebClient - # Define the event handler for progress - $ProgressChanged = { - param ($sender, $e) - Write-Progress -Activity "Downloading $url" -Status "$($e.ProgressPercentage)% Complete" -PercentComplete $e.ProgressPercentage - } - - # Attach the event handler - $webClient.DownloadProgressChanged.Add($ProgressChanged) - # Start the download Write-Host "Downloading $url..." - $webClient.DownloadFileAsync([Uri]$url, $outputPath) - - # Wait for download to complete - while ($webClient.IsBusy) { - Start-Sleep -Milliseconds 100 - } - - # Clean up the event handler and dispose of the WebClient - $webClient.DownloadProgressChanged.Remove($ProgressChanged) - $webClient.Dispose() - Write-Progress -Activity "Download" -Completed + $webClient.DownloadFile($url, $outputPath) } # Start download jobs with progress reporting -Get-FileWithProgress -url $influxDbUrl -outputPath $influxDbZip +Download-WithProgress -url $influxDbUrl -outputPath $influxDbZip Write-Host "InfluxDB download complete." -Get-FileWithProgress -url $shawlReleaseUrl -outputPath $shawlReleaseZip +Download-WithProgress -url $shawlReleaseUrl -outputPath $shawlReleaseZip Write-Host "Shawl release download complete." -Get-FileWithProgress -url $shawlSourceUrl -outputPath $shawlSourceZip +Download-WithProgress -url $shawlSourceUrl -outputPath $shawlSourceZip Write-Host "Shawl source code download complete." # Extract InfluxDB @@ -80,7 +60,7 @@ Expand-Archive -Path $shawlReleaseZip -DestinationPath $shawlDir Expand-Archive -Path $shawlSourceZip -DestinationPath $shawlDir # Move the LICENSE file to the Shawl_bin directory and rename it to LICENSE2 -$licenseFile = "$shawlDir\shawl-1.5.1\LICENSE" +$licenseFile = "$shawlDir\shawl-1.5.1\LICENSE" # Adjust according to the extracted folder structure if (Test-Path $licenseFile) { Rename-Item -Path $licenseFile -NewName "LICENSE2" Move-Item -Path "$shawlDir\shawl-1.5.1\LICENSE2" -Destination $shawlDir From e82f4bc32e466a6b6baaf0b8307867b9bbed513d Mon Sep 17 00:00:00 2001 From: b-erik99 Date: Tue, 5 Nov 2024 10:37:04 +0100 Subject: [PATCH 3/5] Merge download file from dev --- download_sources.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/download_sources.ps1 b/download_sources.ps1 index b4c66b4..472bf65 100644 --- a/download_sources.ps1 +++ b/download_sources.ps1 @@ -41,13 +41,13 @@ function Get-FileWithProgress { } # Start download jobs with progress reporting -Download-WithProgress -url $influxDbUrl -outputPath $influxDbZip +Get-FileWithProgress -url $influxDbUrl -outputPath $influxDbZip Write-Host "InfluxDB download complete." -Download-WithProgress -url $shawlReleaseUrl -outputPath $shawlReleaseZip +Get-FileWithProgress -url $shawlReleaseUrl -outputPath $shawlReleaseZip Write-Host "Shawl release download complete." -Download-WithProgress -url $shawlSourceUrl -outputPath $shawlSourceZip +Get-FileWithProgress -url $shawlSourceUrl -outputPath $shawlSourceZip Write-Host "Shawl source code download complete." # Extract InfluxDB From f250ca25d0174a760f344d8b5012fc95d6f753ba Mon Sep 17 00:00:00 2001 From: b-erik99 Date: Tue, 5 Nov 2024 10:37:51 +0100 Subject: [PATCH 4/5] Merge download file from dev --- download_sources.ps1 | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/download_sources.ps1 b/download_sources.ps1 index 89c8f37..472bf65 100644 --- a/download_sources.ps1 +++ b/download_sources.ps1 @@ -17,9 +17,9 @@ New-Item -ItemType Directory -Path $influxDbDir New-Item -ItemType Directory -Path $shawlDir # Download URLs -$influxDbUrl = "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.10-windows.zip" -$shawlReleaseUrl = "https://github.com/mtkennerly/shawl/releases/download/v1.5.1/shawl-v1.5.1-win64.zip" -$shawlSourceUrl = "https://github.com/mtkennerly/shawl/archive/refs/tags/v1.5.1.zip" +$influxDbUrl = "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.10-windows.zip" # Change to the latest version +$shawlReleaseUrl = "https://github.com/mtkennerly/shawl/releases/download/v1.5.1/shawl-v1.5.1-win64.zip" # Change to the correct URL +$shawlSourceUrl = "https://github.com/mtkennerly/shawl/archive/refs/tags/v1.5.1.zip" # Change to the correct URL if needed # Define file paths $influxDbZip = "$influxDbDir\influxdb.zip" @@ -33,31 +33,11 @@ function Get-FileWithProgress { [string]$outputPath ) - # Initialize the WebClient $webClient = New-Object System.Net.WebClient - # Define the event handler for progress - $ProgressChanged = { - param ($sender, $e) - Write-Progress -Activity "Downloading $url" -Status "$($e.ProgressPercentage)% Complete" -PercentComplete $e.ProgressPercentage - } - - # Attach the event handler - $webClient.DownloadProgressChanged.Add($ProgressChanged) - # Start the download Write-Host "Downloading $url..." - $webClient.DownloadFileAsync([Uri]$url, $outputPath) - - # Wait for download to complete - while ($webClient.IsBusy) { - Start-Sleep -Milliseconds 100 - } - - # Clean up the event handler and dispose of the WebClient - $webClient.DownloadProgressChanged.Remove($ProgressChanged) - $webClient.Dispose() - Write-Progress -Activity "Download" -Completed + $webClient.DownloadFile($url, $outputPath) } # Start download jobs with progress reporting @@ -80,7 +60,7 @@ Expand-Archive -Path $shawlReleaseZip -DestinationPath $shawlDir Expand-Archive -Path $shawlSourceZip -DestinationPath $shawlDir # Move the LICENSE file to the Shawl_bin directory and rename it to LICENSE2 -$licenseFile = "$shawlDir\shawl-1.5.1\LICENSE" +$licenseFile = "$shawlDir\shawl-1.5.1\LICENSE" # Adjust according to the extracted folder structure if (Test-Path $licenseFile) { Rename-Item -Path $licenseFile -NewName "LICENSE2" Move-Item -Path "$shawlDir\shawl-1.5.1\LICENSE2" -Destination $shawlDir From ca6bec07fe61b968605f90fe8e29692b4396c4d9 Mon Sep 17 00:00:00 2001 From: b-erik99 Date: Tue, 5 Nov 2024 10:59:55 +0100 Subject: [PATCH 5/5] completed update-repair feature --- InfluxWindowsInstaller.iss | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/InfluxWindowsInstaller.iss b/InfluxWindowsInstaller.iss index 210e37b..4198e70 100644 --- a/InfluxWindowsInstaller.iss +++ b/InfluxWindowsInstaller.iss @@ -55,41 +55,20 @@ var License2NotAcceptedRadio: TRadioButton; ErrorCode: Integer; IsUpdating: Boolean; - IsRepairing: Boolean; - -procedure UpdatePageTextsForRepair(); -begin - if IsRepairing then - begin - // Modify welcome page texts - WizardForm.WelcomeLabel1.Caption := 'Riparazione di {#AppTitle}'; - WizardForm.WelcomeLabel2.Caption := 'L installazione rileva che questa versione è già presente. Proseguirà in modalità riparazione.'; - - // Customize other page titles and descriptions - WizardForm.PageTitles[wpSelectDir] := 'Seleziona la cartella di riparazione'; - WizardForm.PageDescriptions[wpSelectDir] := 'Seleziona la cartella in cui è già installato {#AppTitle} per continuare con la riparazione.'; - - WizardForm.PageTitles[wpSelectProgramGroup] := 'Configura gruppo di programmi per riparazione'; - WizardForm.PageDescriptions[wpSelectProgramGroup] := 'Scegli il gruppo di programmi in cui verranno aggiornati i collegamenti per {#AppTitle}.'; - - WizardForm.PageTitles[wpReady] := 'Pronto per la riparazione'; - WizardForm.PageDescriptions[wpReady] := 'Il programma è pronto per riparare {#AppTitle}. Fai clic su Avanti per continuare.'; - end; -end; function InitializeSetup: Boolean; var Version: String; begin IsUpdating := False; - IsRepairing := False; Result := True; if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#AppId}_is1', 'DisplayVersion') then begin RegQueryStringValue(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#AppId}_is1', 'DisplayVersion', Version); if Version = '{#AppVer}' then begin - IsRepairing := True; + if MsgBox(ExpandConstant('Tne same version of {#AppTitle} v{#AppVer} is already installed. Press ok to perform a repair installation or cancel to abort.'), mbInformation, MB_OKCANCEL) = IDCANCEL then + Result := False; end else if Version > '{#AppVer}' then begin @@ -149,7 +128,6 @@ end; function ShouldSkipPage(PageID: Integer): Boolean; begin Result := ((PageID = wpSelectTasks) or (PageID = wpReady))and IsUpdating; - Log('coa') end; procedure ServiceRegistration();