Updated chrome function to check for chrome filepath variable before setting it based on hardcoded path
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user