Every time chrome gets updated, I have to manually download the matching chromedriver for selenium and paste it in the selenium directory. I want to create a script which would catch the exception if selenium fails to start the chromedriver and then checks for the chrome version, downloads the latest chromedriver from selenium website and replaces the old driver in the selenium directory with this new downloaded file.

Nice code, tmplinshi.
RunHide() is usefull for a lot of projects, I love it.

I combined the code to one function that checks your Chrome and downloads the latest release ChromeDriver.
I am not convinced this is usefull, I have the impression that older ChromeDrivers work most of the time.
But it was a nice exercise as it combines some more advanced functions.

Before running the code you need to fix the lines with "Broken Link for safety" in it (I post this code before my 30th post).
So remove "Broken Link for safety" in those lines and add ":\\" in the line

Updates 2019-10-12:
- Update RunHide function.
- A backup of old chromedriver will now be moved to backup folder.
- chromedriver.exe will now be unzipped in correct folder.

@AHK_user Sorry actually I posted a not working RunHide function, the cmd window is still visible if the command takes long time, for example RunHide("ping autohotkey.com"). I've fixed it and updated above #p294353.

I have updated the function of my previous post p296130:
- The new RunHide() function
- chromedriver.exe is overwritten (and moved the old exe file to a backup folder).

On my system, I have a chromedriver.exe file on both directory's, so I am not sure what the correct one is .
Dir_Chromedriver:= "C:\Users\" A_UserName "\AppData\Local\SeleniumBasic\chromedriver.exe"
Dir_Chromedriver:= "C:\Program Files\SeleniumBasic\chromedriver.exe"

Does anybody knows why SeleniumBasic is always installed on a user folder?
The installer does not gives the option to select the install directory.
I would prefer to install it for every user.

The function FindSeleniumInstallPath() is failing on my computer(Windows 10), the register comes back empty.

I am just recently starting to become active on the forum, I will fix it wen I get to my 30th post.
Still 16 to go

I don't know, is it 20 or 30..? Well, I can't promote you, but I fixed the two (?) broken links for now. I mean, it's a quality post

Dang, I just saw, you added an explanation to that post - good idea.
But if you like, I can now remove that sentence, too, because if you now edit your post again, these links will probably break again )
Edit: I added a note instead. So, if they should break again, there is still your hint...

Nice code, tmplinshi.
RunHide() is usefull for a lot of projects, I love it.

I combined the code to one function that checks your Chrome and downloads the latest release ChromeDriver.
I am not convinced this is usefull, I have the impression that older ChromeDrivers work most of the time.
But it was a nice exercise as it combines some more advanced functions.

Before running the code you need to fix the lines with "Broken Link for safety" in it (I post this code before my 30th post).
So remove "Broken Link for safety" in those lines and add ":\\" in the line

Updates 2019-10-12:
- Update RunHide function.
- A backup of old chromedriver will now be moved to backup folder.
- chromedriver.exe will now be unzipped in correct folder.