Update Google Chrome SCCM

Abdallla
Abdallla used Ask the Experts™
how to install google chrome browser via SCCM

I downloaded the standalone offline installer (about 57MB),

One issue, if you install the exe while the browser is open, it needs to close to apply the update or click relaunch from the browser. But via a script, how can we do it.

The deployment script.bat working fine at a local computer, but when I deploy it via SCCM its installs the chrome but not closing the browser and displays some message as chrome installed without administrative.

Anyone have abetter idea to install/update chrome, please share

Below script:

start "Installing Chrome Silently" /wait "ChromeStandaloneSetup.exe" /silent /install
echo x=msgbox("Google Chrome browser has been updated successfully. For security reasons, it will relaunch automatically after three minutes.",0,"Security Team") > %tmp%\tmp.vbs
cscript //nologo %tmp%\tmp.vbs
del %tmp%\tmp.vbs
@echo off 
timeout /t 180 /nobreak
taskkill /F /IM chrome.exe /T
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --restore-last-session

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018
Why not install it on reboot? Why would it have to be during the session?
Thanks McKnife,

its's good idea but for me most of users are  logging  off  with out rebooting, and i need  to re-mediate the issue asap.
Distinguished Expert 2018
I don't use SCCM.
I would inform the user and then just close chrome.
Msg * Chrome will be updated and will close in 20 seconds
Timeout 20
Taskkill /im chrome.exe /f
Chromesetup.exe /silent

Open in new window

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Distinguished Expert 2018
Three choices:
  1. Let it just update upon restarting Chrome (less disruptive)
  2. Force it closed. McKnife gave a solid approach to doing it. Obviously, it's disruptive.
  3. Do #1 a few days before you push Windows patches. Since those generally require a reboot, it will force the issue.
Thanks masnrock and McKnife for you help

for the point#2, forcing chorme to close before getting updated , it may not help. kill the chrome and relunch it again will not update the version. the script provided by McKnife will help me after updating the chrome  to apply the new  changes.

if you could help me writing  a.bat script  that  check if chrome exists and version less than 78.0.3904.87  then run update.exe

the below command run fine ,but when redirect the output to variable %chromeversion% it not working

set "chromeversion = (if exist "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version  | findstr /R [0-9])"
if "%chromeversion%"  lSS "78.0.3904.87" update.exe

Open in new window

Distinguished Expert 2018
The question is really whether you're willing to disrupt users. If no, see suggestion 3 that I had posted. IMHO, that would be the best way to go about it.
Distinguished Expert 2018
The script I gave you closes chrome and updates it. No need for a version check.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial