From 991f3e3917d1d107a6c4452d911ed1189f6168d4 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Tue, 26 Dec 2023 00:46:00 -0500 Subject: [PATCH 1/7] Prevent Possibility of Country being set empty --- MSEdgeRedirect_Wrapper.au3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index 8fb4224..5e75085 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -413,6 +413,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr GUICtrlSetData(-1, "Install") EndIf ElseIf $iPage = $hSettings Or $iPage = $hCountry Then + GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetData(-1, "Save") EndIf Local $hCancel = GUICtrlCreateButton("Cancel", 530, 435, 90, 30) @@ -991,6 +992,7 @@ 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], "✓ / ✓") + GUICtrlSetState($hNext, $GUI_ENABLE) Case $hMsg = $hAddEEA For $iLoop = 0 To Ubound($aOld) - 2 Step 1 From be062c188d38a60fd9d3d7ad1a9e83641885f8b7 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Thu, 28 Dec 2023 10:01:11 -0500 Subject: [PATCH 2/7] Fix swapped data values --- MSEdgeRedirect_Wrapper.au3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index 5e75085..74db372 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -867,8 +867,8 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\DeviceRegion", "DeviceRegion", "REG_DWORD", GUICtrlRead($aNew[0])) RegWrite("HKEY_USERS\.DEFAULT\Control Panel\International\Geo", "Name", "REG_SZ", GUICtrlRead($aNew[1])) RegWrite("HKEY_USERS\.DEFAULT\Control Panel\International\Geo", "Nation", "REG_SZ", GUICtrlRead($aNew[2])) - RegWrite("HKEY_CURRENT_USER\Control Panel\International\Geo", "Nation", "REG_SZ", GUICtrlRead($aNew[3])) - RegWrite("HKEY_CURRENT_USER\Control Panel\International\Geo", "Name", "REG_SZ", GUICtrlRead($aNew[4])) + RegWrite("HKEY_CURRENT_USER\Control Panel\International\Geo", "Name", "REG_SZ", GUICtrlRead($aNew[3])) + RegWrite("HKEY_CURRENT_USER\Control Panel\International\Geo", "Nation", "REG_SZ", GUICtrlRead($aNew[4])) EndIf MsgBox($MB_OK + $MB_ICONINFORMATION + $MB_TOPMOST, "Reboot Required", "A Reboot/Restart is required to Complete the Regional Changes of Europe Mode.") Exit From e90caae85a7ff30d37b47e4e7ffb94972700636e Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Thu, 28 Dec 2023 10:26:37 -0500 Subject: [PATCH 3/7] Strengthen MS-Settings Call Check. Pass through if valid. --- MSEdgeRedirect.au3 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MSEdgeRedirect.au3 b/MSEdgeRedirect.au3 index 6d5bf13..190c71e 100644 --- a/MSEdgeRedirect.au3 +++ b/MSEdgeRedirect.au3 @@ -565,8 +565,11 @@ Func _DecodeAndRun($sEdge = $aEdges[1], $sCMDLine = "") Local $aCMDLine Select + Case StringRegExp($sCMDLine, "--default-search-provider=\? --out-pipe-name=MSEdgeDefault[a-z0-9]+") + FileWrite($hLogs[$AppSecurity], _NowCalc() & " - Passed Through MS-Settings Call: " & $sCMDLine & @CRLF) + _SafeRun($sEdge, $sCMDLine) Case StringInStr($sCMDLine, "--default-search-provider=?") - FileWrite($hLogs[$URIFailures], _NowCalc() & " - Skipped Settings URL: " & $sCMDLine & @CRLF) + FileWrite($hLogs[$URIFailures], _NowCalc() & " - Blocked Invalid MS-Settings Call: " & $sCMDLine & @CRLF) Case StringInStr($sCMDLine, "profiles_settings") FileWrite($hLogs[$URIFailures], _NowCalc() & " - Skipped Profile Settings URL: " & $sCMDLine & @CRLF) Case StringInStr($sCMDLine, ".pdf") From c1554f1c4ce5dbd159459fa49e1a3ddf275afa11 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Thu, 28 Dec 2023 18:13:40 -0500 Subject: [PATCH 4/7] Add "MSN Home" redirection --- Includes/_URLModifications.au3 | 37 +++++++++++++++++++- MSEdgeRedirect_Wrapper.au3 | 64 ++++++++++++++++++++++++++-------- 2 files changed, 86 insertions(+), 15 deletions(-) diff --git a/Includes/_URLModifications.au3 b/Includes/_URLModifications.au3 index 7ca5e17..2ee2ce7 100644 --- a/Includes/_URLModifications.au3 +++ b/Includes/_URLModifications.au3 @@ -5,6 +5,40 @@ #include "Base64.au3" #include "_Settings.au3" +Func _ChangeFeedProvider($sURL) + + If StringRegExp($sURL, "https?\:\/\/www.msn\.com\/[a-z]{2}-[a-z]{2}\/feed.*") Then + + Switch _GetSettingValue("Feed") + + Case "Ask" + $sUrl = "https://www.ask.com/" + + Case "Baidu" + $sURL = "https://news.baidu.com/" + + Case "Custom" + $sURL = _GetSettingValue("FeedPath") + + Case "Google" + $sURL = "https://news.google.com/" + + Case "Yahoo" + $sURL = "https://news.yahoo.com/" + + Case Null + $sURL = $sURL + + Case Else + $sURL = _GetSettingValue("FeedPath") + + EndSwitch + EndIf + + Return $sURL + +EndFunc + Func _ChangeImageProvider($sURL) Local $sOriginal @@ -25,7 +59,7 @@ Func _ChangeImageProvider($sURL) $sURL = "https://search.brave.com/?ia=images&iax=images&q=" & $sURL Case "Custom" - $sURL = _GetSettingValue("SearchPath") + $sURL = _GetSettingValue("ImagePath") If StringInStr($sURL, "%query%") Then $sURL = StringReplace($sURL, "%query%", $sOriginal) Else @@ -309,6 +343,7 @@ EndFunc Func _ModifyURL($sURL) + If _GetSettingValue("NoFeed") Then $sURL = _ChangeFeedProvider($sURL) If _GetSettingValue("NoImgs") Then $sURL = _ChangeImageProvider($sURL) If _GetSettingValue("NoNews") Then $sURL = _ChangeNewsProvider($sURL) If _GetSettingValue("NoBing") Then $sURL = _ChangeSearchEngine($sURL) diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index 74db372..0922a8b 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -25,7 +25,7 @@ Global $sVersion Global $bIsPriv = _IsPriviledgedInstall() -Global Enum $bNoApps, $bNoBing, $bNoChat, $bNoImgs, $bNoMSN, $bNoNews, $bNoPDFs, $bNoPilot, $bNoTray, $bNoUpdates, $sImages, $sImagePath, $sNews, $sPDFApp, $sSearch, $sSearchPath, $sStartMenu, $bStartup, $sWeather, $sWeatherPath +Global Enum $bNoApps, $bNoBing, $bNoChat, $bNoFeed, $bNoImgs, $bNoMSN, $bNoNews, $bNoPDFs, $bNoPilot, $bNoTray, $bNoUpdates, $sFeed, $sFeedPath, $sImages, $sImagePath, $sNews, $sPDFApp, $sSearch, $sSearchPath, $sStartMenu, $bStartup, $sWeather, $sWeatherPath If @Compiled Then $sVersion = FileGetVersion(@ScriptFullPath) @@ -42,6 +42,7 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings, $bSilent = False) SetOptionsRegistry("NoApps" , $aSettings[$bNoApps] , $aConfig) SetOptionsRegistry("NoBing" , $aSettings[$bNoBing] , $aConfig) SetOptionsRegistry("NoChat" , $aSettings[$bNoChat] , $aConfig) + SetOptionsRegistry("NoFeed" , $aSettings[$bNoFeed] , $aConfig) SetOptionsRegistry("NoImgs" , $aSettings[$bNoImgs] , $aConfig) SetOptionsRegistry("NoMSN" , $aSettings[$bNoMSN] , $aConfig) SetOptionsRegistry("NoNews" , $aSettings[$bNoNews] , $aConfig) @@ -49,6 +50,8 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings, $bSilent = False) SetOptionsRegistry("NoPilot" , $aSettings[$bNoPilot] , $aConfig) SetOptionsRegistry("NoTray" , $aSettings[$bNoTray] , $aConfig) SetOptionsRegistry("NoUpdates" , $aSettings[$bNoUpdates] , $aConfig) + SetOptionsRegistry("Feed" , $aSettings[$sFeed] , $aConfig) + SetOptionsRegistry("FeedPath" , $aSettings[$sFeedPath] , $aConfig) SetOptionsRegistry("Images" , $aSettings[$sImages] , $aConfig) SetOptionsRegistry("ImagePath" , $aSettings[$sImagePath] , $aConfig) SetOptionsRegistry("News" , $aSettings[$sNews] , $aConfig) @@ -228,6 +231,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $sEdges Local $sEngine Local $sImgEng + Local $sFeedEng Local $sHandler Local $bResumed = False Local $hChannels[5] @@ -237,7 +241,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $aConfig[3] = [$hSetupFile, False, "Service"] ; Default Setup.ini Values Local Enum $hFile, $bManaged, $vMode - Local $aSettings[20] = [False, False, False, False, False, False, False, False, False, False, "", "", "", "", "", "", "Full", True, "", ""] + Local $aSettings[23] = [False, False, False, False, False, False, False, False, False, False, False, "", "", "", "", "", "", "", "", "Full", True, "", ""] If $iPage < 0 Then $iPage = Abs($iPage) @@ -250,6 +254,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $aSettings[$bNoApps] = _Bool(_GetSettingValue("NoApps")) $aSettings[$bNoBing] = _Bool(_GetSettingValue("NoBing")) $aSettings[$bNoChat] = _Bool(_GetSettingValue("NoChat")) + $aSettings[$bNoFeed] = _Bool(_GetSettingValue("NoFeed")) $aSettings[$bNoImgs] = _Bool(_GetSettingValue("NoImgs")) $aSettings[$bNoMSN] = _Bool(_GetSettingValue("NoMSN")) $aSettings[$bNoNews] = _Bool(_GetSettingValue("NoNews")) @@ -261,6 +266,10 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $aSettings[$sSearch] = _GetSettingValue("Search") $aSettings[$sSearchPath] = _GetSettingValue("SearchPath") EndIf + If $aSettings[$bNoFeed] Then + $aSettings[$sFeed] = _GetSettingValue("Feed") + $aSettings[$sFeedPath] = _GetSettingValue("FeedPath") + EndIf If $aSettings[$bNoImgs] Then $aSettings[$sImages] = _GetSettingValue("Images") $aSettings[$sImagePath] = _GetSettingValue("ImagePath") @@ -292,6 +301,7 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $aSettings[$bNoApps] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoApps", $aSettings[$bNoApps])) $aSettings[$bNoBing] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoBing", $aSettings[$bNoBing])) $aSettings[$bNoChat] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoChat", $aSettings[$bNoChat])) + $aSettings[$bNoFeed] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoFeed", $aSettings[$bNoFeed])) $aSettings[$bNoImgs] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoImgs", $aSettings[$bNoImgs])) $aSettings[$bNoMSN] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoMSN", $aSettings[$bNoMSN])) $aSettings[$bNoNews] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoNews", $aSettings[$bNoNews])) @@ -299,6 +309,8 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $aSettings[$bNoPilot] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoPilot", $aSettings[$bNoPilot])) $aSettings[$bNoTray] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoTray", $aSettings[$bNoTray])) $aSettings[$bNoUpdates] = _Bool(IniRead($aConfig[$hFile], "Settings", "NoUpdates", $aSettings[$bNoUpdates])) + $aSettings[$sFeed] = _Bool(IniRead($aConfig[$hFile], "Settings", "Feed", $aSettings[$sFeed])) + $aSettings[$sFeedPath] = _Bool(IniRead($aConfig[$hFile], "Settings", "FeedPath", $aSettings[$sFeedPath])) $aSettings[$sImages] = _Bool(IniRead($aConfig[$hFile], "Settings", "Images", $aSettings[$sImages])) $aSettings[$sImagePath] = _Bool(IniRead($aConfig[$hFile], "Settings", "ImagePath", $aSettings[$sImagePath])) $aSettings[$sNews] = _Bool(IniRead($aConfig[$hFile], "Settings", "News", $aSettings[$sNews])) @@ -553,10 +565,10 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr EndIf GUICtrlCreateGroup("Additional Redirections", 20, 200, 420, 210) - Local $hNoImgs = GUICtrlCreateCheckbox("Bing Images:", 50, 220, 180, 20) - Local $hImgSRC = GUICtrlCreateCombo("", 50, 240, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) - GUICtrlSetData(-1, "Baidu|Brave|Custom|DuckDuckGo|Ecosia|Google|Sogou|StartPage|Yahoo|Yandex", "Google") - GUICtrlSetState(-1, $GUI_DISABLE) + Local $hNoFeed = GUICtrlCreateCheckbox("Bing Discover:", 50, 220, 180, 20) + Local $hFeedSRC = GUICtrlCreateCombo("", 50, 240, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) + GUICtrlSetData(-1, "Ask|Baidu|Custom|Google|Yahoo", "Google") + GUICtrlSetState(-1, $GUI_DISABLE) Local $hSearch = GUICtrlCreateCheckbox("Bing Search:", 50, 265, 180, 20) Local $hEngine = GUICtrlCreateCombo("", 50, 285, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) GUICtrlSetData(-1, "Ask|Baidu|Brave|Custom|DuckDuckGo|Ecosia|Google|Lemmy|Sogou|StartPage|Yahoo|Yandex", "Google") @@ -569,15 +581,19 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $hWeather = GUICtrlCreateCombo("", 50, 375, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) GUICtrlSetData(-1, "AccuWeather|Custom|Weather.com|Weather.gov|Windy|WUnderground|Ventusky|Yandex", "Weather.com") GUICtrlSetState(-1, $GUI_DISABLE) - Local $hNoPDFs = GUICtrlCreateCheckbox("PDF Viewer:", 240, 220, 180, 20) - Local $hPDFSrc = GUICtrlCreateCombo("", 240, 240, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) + Local $hNoImgs = GUICtrlCreateCheckbox("Bing Images:", 240, 220, 180, 20) + Local $hImgSRC = GUICtrlCreateCombo("", 240, 240, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) + GUICtrlSetData(-1, "Baidu|Brave|Custom|DuckDuckGo|Ecosia|Google|Sogou|StartPage|Yahoo|Yandex", "Google") + GUICtrlSetState(-1, $GUI_DISABLE) + Local $hNoPDFs = GUICtrlCreateCheckbox("PDF Viewer:", 240, 265, 180, 20) + Local $hPDFSrc = GUICtrlCreateCombo("", 240, 285, 180, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) GUICtrlSetData(-1, "Default|Custom", "Default") GUICtrlSetState(-1, $GUI_DISABLE) - Local $hNoPilot = GUICtrlCreateCheckbox("Disable Windows CoPilot", 240, 265, 180, 20) + Local $hNoPilot = GUICtrlCreateCheckbox("Disable Windows CoPilot", 240, 305, 180, 20) If @OSVersion <> "WIN_11" Then GUICtrlSetState(-1, $GUI_DISABLE) - Local $hNoChat = GUICtrlCreateCheckbox("Redirect Bing Chat", 240, 285, 180, 20) + Local $hNoChat = GUICtrlCreateCheckbox("Redirect Bing Chat", 240, 325, 180, 20) If @OSVersion <> "WIN_11" Then GUICtrlSetState(-1, $GUI_DISABLE) - Local $hNoApps = GUICtrlCreateCheckbox("Redirect Windows Store 'Apps'", 240, 305, 180, 20) + Local $hNoApps = GUICtrlCreateCheckbox("Redirect Windows Store 'Apps'", 240, 345, 180, 20) If $bUpdate Then GUICtrlSetState($hNoApps, _GetSettingValue("NoApps")) @@ -588,6 +604,12 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $sEngine = _GetSettingValue("SearchPath") EndIf GUICtrlSetState($hNoChat, _GetSettingValue("NoChat")) + GUICtrlSetState($hNoFeed, _GetSettingValue("NoFeed")) + If _IsChecked($hNoFeed) Then + GUICtrlSetState($hFeedSRC, $GUI_ENABLE) + GUICtrlSetData($hFeedSRC, _GetSettingValue("Feed")) + $sFeedEng = _GetSettingValue("FeedPath") + EndIf GUICtrlSetState($hNoImgs, _GetSettingValue("NoImgs")) If _IsChecked($hNoImgs) Then GUICtrlSetState($hImgSRC, $GUI_ENABLE) @@ -815,12 +837,15 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $aSettings[$bNoApps] = _IsChecked($hNoApps) $aSettings[$bNoBing] = _IsChecked($hSearch) $aSettings[$bNoChat] = _IsChecked($hNoChat) + $aSettings[$bNoFeed] = _IsChecked($hNoFeed) $aSettings[$bNoImgs] = _IsChecked($hNoImgs) $aSettings[$bNoMSN] = _IsChecked($hNoMSN) $aSettings[$bNoNews] = _IsChecked($hNoNews) $aSettings[$bNoPDFs] = _IsChecked($hNoPDFs) $aSettings[$bNoPilot] = _IsChecked($hNoPilot) $aSettings[$bNoTray] = _IsChecked($hNoIcon) + $aSettings[$sFeed] = GUICtrlRead($hFeedSRC) + $aSettings[$sFeedPath] = $sFeedEng $aSettings[$sImages] = GUICtrlRead($hImgSRC) $aSettings[$sImagePath] = $sImgEng $aSettings[$sNews] = GUICtrlRead($hNewSRC) @@ -935,6 +960,13 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr $sEngine = InputBox("Enter Search Engine URL", "Enter the URL format of the custom Search Engine to use, including the %query% placeholder.", "https://duckduckgo.com/?q=%query%") If @error Then GUICtrlSetData($hEngine, "Google") + Case $hMsg = $hNoFeed + If _IsChecked($hNoFeed) Then + GUICtrlSetState($hFeedSRC, $GUI_ENABLE) + Else + GUICtrlSetState($hFeedSRC, $GUI_DISABLE) + EndIf + Case $hMsg = $hNoImgs If _IsChecked($hNoImgs) Then GUICtrlSetState($hImgSRC, $GUI_ENABLE) @@ -942,6 +974,10 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr GUICtrlSetState($hImgSRC, $GUI_DISABLE) EndIf + Case $hMsg = $hFeedSRC And GUICtrlRead($hFeedSRC) = "Custom" + $sFeedEng = InputBox("Enter Feed URL", "Enter the URL format of the custom Feed to use.", "https://news.google.com") + If @error Then GUICtrlSetData($hFeedSRC, "Google") + Case $hMsg = $hImgSRC And GUICtrlRead($hImgSRC) = "Custom" $sImgEng = InputBox("Enter Image Search Engine URL", "Enter the URL format of the custom Image Search Engine to use, including the %query% placeholder.", "https://duckduckgo.com/?ia=images&iax=images&q=%query%") If @error Then GUICtrlSetData($hImgSRC, "Google") @@ -1188,15 +1224,15 @@ Func SetOptionsRegistry($sName, $vValue, ByRef $aConfig) Select Case IsBool($vValue) RegWrite($sHive & "\SOFTWARE\" & $sPolicy & "Robert Maehl Software\MSEdgeRedirect\", $sName, "REG_DWORD", $vValue) - If @error Then FileWrite($hLogs[$AppFailures], _NowCalc() & " - [WARNING!] Unable to write REG_DWORD Registry Key '" & $sName & "' - with value '" & $vValue & "'" & @CRLF) + If @error Then FileWrite($hLogs[$Install], _NowCalc() & " - [WARNING!] Unable to write REG_DWORD Registry Key '" & $sName & "' - with value '" & $vValue & "'" & @CRLF) Case IsString($vValue) RegWrite($sHive & "\SOFTWARE\" & $sPolicy & "Robert Maehl Software\MSEdgeRedirect\", $sName, "REG_SZ", $vValue) - If @error Then FileWrite($hLogs[$AppFailures], _NowCalc() & " - [WARNING!] Unable to write REG_SZ Registry Key '" & $sName & "' - with value '" & $vValue & "'" & @CRLF) + If @error Then FileWrite($hLogs[$Install], _NowCalc() & " - [WARNING!] Unable to write REG_SZ Registry Key '" & $sName & "' - with value '" & $vValue & "'" & @CRLF) Case Else RegWrite($sHive & "\SOFTWARE\" & $sPolicy & "Robert Maehl Software\MSEdgeRedirect\", $sName, "REG_SZ", $vValue) - If @error Then FileWrite($hLogs[$AppFailures], _NowCalc() & " - [WARNING!] Unable to write REG_SZ Registry Key '" & $sName & "' - with value '" & $vValue & "'" & @CRLF) + If @error Then FileWrite($hLogs[$Install], _NowCalc() & " - [WARNING!] Unable to write REG_SZ Registry Key '" & $sName & "' - with value '" & $vValue & "'" & @CRLF) EndSelect From 28cfe97cc96040ea0a143685ecd5588b6f71cecd Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Thu, 28 Dec 2023 18:13:50 -0500 Subject: [PATCH 5/7] Bump Version --- MSEdgeRedirect.au3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MSEdgeRedirect.au3 b/MSEdgeRedirect.au3 index 190c71e..7d23be9 100644 --- a/MSEdgeRedirect.au3 +++ b/MSEdgeRedirect.au3 @@ -7,9 +7,9 @@ #AutoIt3Wrapper_Res_Comment=https://www.msedgeredirect.com #AutoIt3Wrapper_Res_CompanyName=Robert Maehl Software #AutoIt3Wrapper_Res_Description=MSEdgeRedirect -#AutoIt3Wrapper_Res_Fileversion=0.7.5.2 +#AutoIt3Wrapper_Res_Fileversion=0.7.5.3 #AutoIt3Wrapper_Res_ProductName=MSEdgeRedirect App & Service -#AutoIt3Wrapper_Res_ProductVersion=0.7.5.2 +#AutoIt3Wrapper_Res_ProductVersion=0.7.5.3 #AutoIt3Wrapper_Res_LegalCopyright=Robert Maehl, using LGPL 3 License #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker From dd44a238c0588ea6649376505c137fbc18d31a50 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Thu, 28 Dec 2023 18:23:18 -0500 Subject: [PATCH 6/7] Fix Settings not being Saveable --- MSEdgeRedirect_Wrapper.au3 | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index 0922a8b..ce88927 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -416,18 +416,23 @@ Func RunSetup($bUpdate = False, $bSilent = False, $iPage = 0, $hSetupFile = @Scr Local $hBack = GUICtrlCreateButton("< Back", 330, 435, 90, 30) GUICtrlSetState(-1, $GUI_DISABLE) Local $hNext = GUICtrlCreateButton("Next >", 420, 435, 90, 30) - If $iPage = $hLicense Then - GUICtrlSetState(-1, $GUI_DISABLE) - ElseIf $iPage = $hSettings And $bResumed Then - If $bUpdate Then - GUICtrlSetData(-1, "Update") - Else - GUICtrlSetData(-1, "Install") - EndIf - ElseIf $iPage = $hSettings Or $iPage = $hCountry Then - GUICtrlSetState(-1, $GUI_DISABLE) - GUICtrlSetData(-1, "Save") - EndIf + Select + Case $iPage = $hLicense + GUICtrlSetState(-1, $GUI_DISABLE) + Case $iPage = $hSettings And $bResumed + If $bUpdate Then + GUICtrlSetData(-1, "Update") + Else + GUICtrlSetData(-1, "Install") + EndIf + Case $iPage = $hLicense + ContinueCase + Case $iPage = $hCountry + GUICtrlSetState(-1, $GUI_DISABLE) + ContinueCase + Case $iPage = $hSettings + GUICtrlSetData(-1, "Save") + EndSelect Local $hCancel = GUICtrlCreateButton("Cancel", 530, 435, 90, 30) #Region License Page From e2289d59d82a35250e4e9fe1a0322500f3920a57 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Thu, 28 Dec 2023 18:56:23 -0500 Subject: [PATCH 7/7] Log Additinal Instlal Failures to Install Log --- MSEdgeRedirect_Wrapper.au3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MSEdgeRedirect_Wrapper.au3 b/MSEdgeRedirect_Wrapper.au3 index ce88927..c56e387 100644 --- a/MSEdgeRedirect_Wrapper.au3 +++ b/MSEdgeRedirect_Wrapper.au3 @@ -68,7 +68,7 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings, $bSilent = False) If $aConfig[$vMode] Then If Not FileCopy(@ScriptFullPath, $sDrive & "\Program Files\MSEdgeRedirect\MSEdgeRedirect.exe", $FC_CREATEPATH+$FC_OVERWRITE) Then - FileWrite($hLogs[$AppFailures], _NowCalc() & " - [CRITICAL] Unable to copy application to " & $sDrive & "'\Program Files\MSEdgeRedirect\MSEdgeRedirect.exe'" & @CRLF) + FileWrite($hLogs[$Install], _NowCalc() & " - [CRITICAL] Unable to copy application to " & $sDrive & "'\Program Files\MSEdgeRedirect\MSEdgeRedirect.exe'" & @CRLF) If Not $bSilent Then MsgBox($MB_ICONERROR + $MB_OK, _ "[CRITICAL]", _ @@ -79,7 +79,7 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings, $bSilent = False) Else If $aSettings[$bNoTray] Then $sArgs = "/hide" If Not FileCopy(@ScriptFullPath, @LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe", $FC_CREATEPATH+$FC_OVERWRITE) Then - FileWrite($hLogs[$AppFailures], _NowCalc() & " - [CRITICAL] Unable to copy application to '" & @LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe'" & @CRLF) + FileWrite($hLogs[$Install], _NowCalc() & " - [CRITICAL] Unable to copy application to '" & @LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe'" & @CRLF) If Not $bSilent Then MsgBox($MB_ICONERROR + $MB_OK, _ "[CRITICAL]", _ @@ -89,7 +89,7 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings, $bSilent = False) EndIf If $aSettings[$bStartup] Then If Not FileCreateShortcut(@LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe", @StartupDir & "\MSEdgeRedirect.lnk", @LocalAppDataDir & "\MSEdgeRedirect\", $sArgs) Then - FileWrite($hLogs[$AppFailures], _NowCalc() & " - [WARNING] Unable to create application link in '" & @StartupDir & "\MSEdgeRedirect.lnk'" & @CRLF) + FileWrite($hLogs[$Install], _NowCalc() & " - [WARNING] Unable to create application link in '" & @StartupDir & "\MSEdgeRedirect.lnk'" & @CRLF) EndIf EndIf EndIf