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
; Establish Variable with Filepath to be used throughout the script
ChromePortableFilepath = %A_ScriptDir%\Lib\chrome-win64\chrome.exe
if(ChromeFilepath = ""){
if(FileExist(ChromePortableFilepath)){
ChromeFilepath := ChromePortableFilepath
ChromePortableFilepath = %A_ScriptDir%\Lib\chrome-win64\chrome.exe
Message = Using Chromium Portable for Upload
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(ChromePortableFilepath)){
ChromeFilepath := ChromePortableFilepath
if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe"))
ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe
Message = Using Chromium Portable for Upload
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