Skip to content

Commit

Permalink
Start on #315, #318
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl committed Sep 29, 2023
1 parent 3c043d7 commit f15607c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions MSEdgeRedirect.au3
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Func ActiveMode(ByRef $aCMDLine)
ContinueCase
Case $sParent = "Hurl.exe"
ContinueCase
Case $sParent = "MSEdgeRedirect.exe"
_ArrayDisplay($aCMDLine)
Case $aCMDLine[0] = 2 And $aCMDLine[2] = "--continue-active-setup"
_SafeRun($aCMDLine[1], $aCMDLine[2])
Case _ArraySearch($aCMDLine, "localhost:", 2, 0, 0, 1) > 0 ; Improve on #162
Expand Down Expand Up @@ -165,9 +167,9 @@ Func FixTreeIntegrity($aCMDLine)

ProcessClose($iParent)

Case "MSEdgeRedirect.exe"
Case Else

_SafeRun(StringReplace($aEdges[1], "msedge.exe", "msedge_IFEO.exe"), $aCMDLine[3])
;;;

EndSwitch
Return $aCMDLine
Expand Down Expand Up @@ -309,12 +311,14 @@ Func ProcessCMDLine()
$bSilent = True
$hFile = "WINGET"
_ArrayDelete($CmdLine, 1)
Case "--MSEdgeRedirect"
;;;
Case Else
FileWrite($hLogs[$PEBIAT], _NowCalc() & " - " & "Unexpected Commandline: " & _ArrayToString($CmdLine) & @CRLF)
If @Compiled Then ; support for running non-compiled script - mLipok
MsgBox(0, _
"Invalid", _
'Invalid parameter - "' & $CmdLine[1] & "." & @CRLF)
'Invalid parameter - "' & $CmdLine[1] & '".' & @CRLF)
Exit 87 ; ERROR_INVALID_PARAMETER
EndIf
EndSwitch
Expand Down Expand Up @@ -581,7 +585,7 @@ Func _DecodeAndRun($sEdge = $aEdges[1], $sCMDLine = "")
EndSelect
Case StringInStr($sCMDLine, "bing.com/chat") Or StringInStr($sCMDLine, "bing.com%2Fchat") ; Fix BingAI
If _GetSettingValue("NoChat") Then
;;;
ShellExecute($sCMDLine)
Else
_SafeRun($sEdge, $sCMDLine)
EndIf
Expand Down

0 comments on commit f15607c

Please sign in to comment.