Skip to content

Instantly share code, notes, and snippets.

@bygreencn
Forked from mikhaelkh/ChrUpdWin.cmd
Last active August 29, 2015 14:08
Show Gist options
  • Save bygreencn/4f78f2b19f67d548c3ea to your computer and use it in GitHub Desktop.
Save bygreencn/4f78f2b19f67d548c3ea to your computer and use it in GitHub Desktop.
@echo off
if exist running exit
if "%PROCESSOR_ARCHITECTURE%" == "x86" set platform=Win
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" set platform=Win_x64
if "%platform%" == "" echo Supported only x86 and amd64 cpu architectures. & pause & exit
set channel=continuous
set url=https://storage.googleapis.com/chromium-browser-%channel%/%platform%
set wget=wget.exe -N --no-check-certificate
type nul > running
if "%1" == "" (
%wget% %url%/LAST_CHANGE || goto hell
fc LAST_CHANGE LastVersion && goto hell
for /f %%i in (LAST_CHANGE) do %wget% %url%/%%i/mini_installer.exe || goto hell
) else %wget% %url%/%1/mini_installer.exe || goto hell
tasklist | find "chrome.exe" && goto hell
move /y LAST_CHANGE LastVersion
echo Installing Chromium...
start /wait mini_installer.exe
:hell
del /q running LAST_CHANGE
cd /d "%localappdata%\Chromium\Application\" && del /s /q chrome.7z & cd /d "%~dp0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment