Created
December 22, 2013 07:54
-
-
Save xdqi/8079553 to your computer and use it in GitHub Desktop.
A simple update of Chromium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::注意:Vista、Win7、Win8 请用管理员运行此程序 | |
echo Loading... | |
del LAST_CHANGE /f /s /q | |
del install.exe /f /s /q | |
wget "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/LAST_CHANGE" -OLAST_CHANGE | |
for /f %%i in (LAST_CHANGE) do set newver=%%i | |
del LAST_CHANGE /f /s /q | |
cls | |
echo, | |
echo, | |
title Chromium Updater by QXD12@QQ.COM | |
(for /f "tokens=3" %%b in ('reg query HKCU\Software\Chromium /v UpdVer') do set installedver=%%b)2>nul | |
if not a%installedver% == a (echo,已安装版本:%installedver% | |
) else ( | |
echo 您是第一次使用本更新器) | |
echo,最新版本 :%newver% | |
echo, | |
set /a installedver=%installedver%+1-1 | |
if %installedver% lss %newver% ( | |
set /p=当前安装的不是最新版本,是否更新 Chromium?^(按任意键更新^)<nul & pause>nul & echo, | |
) else ( | |
echo 当前安装的版本为最新,请明天再更新 Chromium 吧。& pause & exit ) | |
echo 下载最新版本中、、、 | |
wget "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/%newver%/mini_installer.exe" -Oinstall.exe | |
reg add HKCU\Software\Chromium /v UpdVer /d %newver% /f | |
echo 正在安装 Chromium ... | |
start /wait "" install.exe | |
for /f "tokens=3" %%c in ('reg query HKCU\Software\Chromium /v InstallerSuccessLaunchCmdLine') do start "" %%c | |
echo 看到 Chromium 出现了吧 ^^_^^,安装完毕。谢谢您的使用! | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment