Updated chrome function to check for chrome filepath variable before setting it based on hardcoded path

main
Yuriy 1 year ago
parent 5d0932c150
commit 3620e37e45

@ -23,20 +23,23 @@ GetChromeFilepath(){
; ChromeFilepath is global variable ; ChromeFilepath is global variable
; Establish Variable with Filepath to be used throughout the script ; Establish Variable with Filepath to be used throughout the script
ChromePortableFilepath = %A_ScriptDir%\Lib\chrome-win64\chrome.exe if(ChromeFilepath = ""){
if(FileExist(ChromePortableFilepath)){ ChromePortableFilepath = %A_ScriptDir%\Lib\chrome-win64\chrome.exe
ChromeFilepath := ChromePortableFilepath
Message = Using Chromium Portable for Upload if(FileExist(ChromePortableFilepath)){
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") ChromeFilepath := ChromePortableFilepath
}
else {
if(FileExist("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"))
ChromeFilepath = C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe")) Message = Using Chromium Portable for Upload
ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
}
else {
if(FileExist("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"))
ChromeFilepath = C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe"))
ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe
}
} }
} }

Loading…
Cancel
Save