From 2e39c7340cc6e7bdfa2eb5786943641a8e2c0287 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 11 Oct 2020 22:43:08 -0400 Subject: [PATCH] Windows installer improvements Co-Authored-By: Mark McDowall (cherry picked from commit 02c95658c4a5d38e1d0997ed5ef9bbd219ffc32c) --- distribution/windows/setup/readarr.iss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/distribution/windows/setup/readarr.iss b/distribution/windows/setup/readarr.iss index 32764e12b..7747ce923 100644 --- a/distribution/windows/setup/readarr.iss +++ b/distribution/windows/setup/readarr.iss @@ -44,8 +44,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopIcon"; Description: "{cm:CreateDesktopIcon}" -Name: "windowsService"; Description: "Install Windows Service (Starts when the computer starts as the LocalService user, you will need to change the user to access network shares)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked -Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive +Name: "windowsService"; Description: "Install Windows Service (Starts when the computer starts as the LocalService user, you will need to change the user to access network shares)"; GroupDescription: "Start automatically"; Flags: exclusive +Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked [Dirs] @@ -72,12 +72,13 @@ Filename: "{app}\bin\Readarr.exe"; Description: "Open Readarr Web UI"; Flags: po Filename: "{app}\bin\Readarr.exe"; Description: "Start Readarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none; [UninstallRun] -Filename: "{app}\bin\Readarr.Console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist +Filename: "{app}\bin\readarr.console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist [Code] function PrepareToInstall(var NeedsRestart: Boolean): String; var ResultCode: Integer; begin - Exec(ExpandConstant('{commonappdata}\Readarr\bin\Readarr.Console.exe'), '/u', '', 0, ewWaitUntilTerminated, ResultCode) + Exec('net', 'stop readarr', '', 0, ewWaitUntilTerminated, ResultCode) + Exec('sc', 'delete readarr', '', 0, ewWaitUntilTerminated, ResultCode) end;