From f50f630e8d14f230db342bcd67f304a7a0848abe Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Mon, 18 Dec 2023 11:23:00 -0500 Subject: [PATCH 1/2] Add EU Logging --- MSEdgeRedirect_Wrapper.au3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index 7b9a0ee..f95b8f5 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -648,6 +648,8 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $aOld[6] + FileWrite($hLogs[$Install], _NowCalc() & " - " & "Read Pre-European Install Values of: " & _ArrayToString($aNations) & " & " & _ArrayToString($aIDs) & @CRLF) + GUICtrlCreateLabel("Machine Region:", 30, 90, 95, 20) $aOld[0] = GUICtrlCreateLabel($aNations[0], 125, 90, 95, 20, $SS_RIGHT) GUICtrlCreateLabel("Default Region ID:", 30, 110, 95, 20) From a6491afc079ad1f928c4554aa377e0c1c22af57d Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Wed, 20 Dec 2023 12:41:34 -0500 Subject: [PATCH 2/2] Fix Setup Flow --- MSEdgeRedirect.au3 | 6 ++---- MSEdgeRedirect_Wrapper.au3 | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/MSEdgeRedirect.au3 b/MSEdgeRedirect.au3 index 7584888..0b5717a 100644 --- a/MSEdgeRedirect.au3 +++ b/MSEdgeRedirect.au3 @@ -177,8 +177,6 @@ Func FixTreeIntegrity($aCMDLine) EndFunc - - Func ProcessCMDLine() Local $aPIDs @@ -241,7 +239,7 @@ Func ProcessCMDLine() FileWrite($hLogs[$AppFailures], _NowCalc() & " - " & "Active Mode UAC Elevation Attempt Failed!" & @CRLF) Exit Else - RunSetup($aInstall[0], False, 2) + RunSetup($aInstall[0], False, -2) EndIf Case "/ContinueEurope", "/SetEurope" If Not $bIsAdmin Then @@ -251,7 +249,7 @@ Func ProcessCMDLine() FileWrite($hLogs[$AppFailures], _NowCalc() & " - " & "Europe Mode UAC Elevation Attempt Failed!" & @CRLF) Exit Else - RunSetup($aInstall[0], False, 5) + RunSetup($aInstall[0], False, -5) EndIf Case "/f", "/force" $bForce = True diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index f95b8f5..3d84273 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -229,6 +229,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $sEngine Local $sImgEng Local $sHandler + Local $bResumed = False Local $hChannels[5] Local $aChannels[5] = [True, False, False, False, True] Local $sWeatherEng @@ -238,6 +239,11 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $aSettings[20] = [False, False, False, False, False, False, False, False, False, False, "", "", "", "", "", "", "Full", True, "", ""] + If $iPage < 0 Then + $iPage = Abs($iPage) + $bResumed = True + EndIf + If $bSilent Then If $bUpdate Then @@ -400,7 +406,13 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $hNext = GUICtrlCreateButton("Next >", 420, 435, 90, 30) If $iPage = $hLicense Then GUICtrlSetState(-1, $GUI_DISABLE) - ElseIf $iPage = $hSettings Then + ElseIf $iPage = $hSettings And $bResumed Then + If $bUpdate Then + GUICtrlSetData(-1, "Update") + Else + GUICtrlSetData(-1, "Install") + EndIf + ElseIf $iPage = $hSettings Or $iPage = $hCountry Then GUICtrlSetData(-1, "Save") EndIf Local $hCancel = GUICtrlCreateButton("Cancel", 530, 435, 90, 30) @@ -756,7 +768,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $iPage -= 1 Case $hMsg = $hNext - If @Compiled And $iPage <> $hCountry And $iPage <> $hSettings Then + If @Compiled And Not $bResumed Then Select Case _IsChecked($hEurope) @@ -785,7 +797,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Case $hFinish If @Compiled Then # 8.0.0.0 Refactor - If $bUpdate And $iMode <> $hSettings Then + If ($bUpdate And $iMode <> $hSettings) Or $bResumed Then RunRemoval(True) Else FileDelete(@StartupDir & "\MSEdgeRedirect.lnk") @@ -977,14 +989,12 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr GUICtrlSetData($aNew[3], $aCountries[$iIndex][2]) GUICtrlSetData($aNew[4], $aCountries[$iIndex][1]) GUICtrlSetData($aNew[Ubound($aOld) - 1], "✓ / ✓") - GUICtrlSetData($hNext, "Save") Case $hMsg = $hAddEEA For $iLoop = 0 To Ubound($aOld) - 2 Step 1 GUICtrlSetData($aNew[$iLoop], GUICtrlRead($aOld[$iLoop])) Next GUICtrlSetData($aNew[Ubound($aOld) - 1], "✓ / ✓") - GUICtrlSetData($hNext, "Save") Case Else ;;;