Quick & dirty Chromium updater

68 views
Skip to first unread message

ralph63

unread,
Jul 18, 2011, 1:47:26 PM7/18/11
to Chromium Updater
Hi all,

since I've been waiting too long for this neat little tool to be
updated (can't be that much of an extravagance to change a path!), I
decided to hack myself a little script for the update process. Maybe
it is useful for someone else too, so I decided to publish it here...

CAUTION: The script updates only from the snapshot channel! If you
want to get updates from other channels you have to modify the server
path by yourself.

It's a plain CMD-script (haven't had time nor nerves for a full size
app) with one exception: you'll need wget as a web downloader which
you can find here: http://gnuwin32.sourceforge.net/packages/wget.htm
If you use WSUS Offline Update (http://www.wsusoffline.net/) there's
already a copy on your HD in <path to WSUS Offline Update>\bin which
can be used.

As a goodie I included the insertion of pdf.dll (PDF Plugin from
Google Chrome), which can reside anywhere on the HD. It can be copied
from any Chrome installation or extracted from the full installer of
Chrome (which can be found here: <http://www.google.com/support/
installer/bin/answer.py?answer=126299&&hl=en>). If you don't like/need
that feature, delete the corresponding line in the paths at the
beginning and the last section of the script.

Three paths have to be set in the first lines of the script. Just
replace the #####s with the paths without quotes(") and without
trailing backslashs (\) [IMPORTANT!]:

+ A directory in which the installer will be downloaded to temporarily
+ The directory in which wget resides (e. g. <path to your WSUS
Offline Update>\bin)
+ The directory in which the pdf.dll from Google Chrome resides

OK, here we go:
(Copy the content between the lines below into a text file, name it
<something>.cmd and start it via CMD or by doubleclicking. If you want
it to be run regularly (as Martin's tool did) create a job in Windows
Scheduler to your liking.)

::
------------------------------------------------------------------------------------------------
@echo off

:: Define some DIRs (Temporary path; path to pdf-Plugin; path to wget)
set TempCrDir=#####
set wgetDir=#####
set pdfDllDir=#####

:: Cleaning last update's mess...
if exist "%TempCrDir%\LATEST" del "%TempCrDir%\LATEST"
if exist "%TempCrDir%\mini_installer.exe" del "%TempCrDir%
\mini_installer.exe"

:: Download latest Chromium build number
"%wgetDir%\wget.exe" -q -P "%TempCrDir%" http://build.chromium.org/f/chromium/snapshots/Win/LATEST

:: Transfer build number to variable CURRENT
set /P CURRENT=< "%TempCrDir%\LATEST"

:: Download latest Chromium build
"%wgetDir%\wget.exe" -P "%TempCrDir%"
http://build.chromium.org/f/chromium/snapshots/Win/%CURRENT%/mini_installer.exe

:: Install downloaded Chromium build
"%TempCrDir%\mini_installer.exe"

:: Copy Google Chrome pdf-Plugin (without mercy into all existing
build directories) :)
for /F "usebackq delims==" %%D IN (`dir /AD /B /O "%LOCALAPPDATA%
\Chromium\Application\1*"`) DO copy /Y "%pdfDllDir%\pdf.dll"
"%LOCALAPPDATA%\Chromium\Application\%%D\" > NUL
::
------------------------------------------------------------------------------------------------

Feel free to comment on the script!

At least for me it does everything I need to keep my Chromium
installation fresh...

Regards
ralph

ralph63

unread,
Jul 18, 2011, 2:03:44 PM7/18/11
to Chromium Updater
Oh crap... Forgot something:

The script is intended to be used under Windows 7 only if you use the
pdf.dll part (at least that's the only OS it was tested it under)! I
can't say if the path used in the last section is valid under XP,
Vista or whatever ancient Windows version is still in use out there...
(To be honest, most of my machines still run XP, but I use another
browser on these...)

And one more caveat: Do not have Chromium running while updating or
the update process will fail without notice. If used with Windows
Scheduler it's probably a good idea to have the updater running right
after login.

I hope, that's all I forgot... (Maybe I'm getting too old for that
sh#t! ;) )

Cheers!
Ralph

ralph63

unread,
Jul 18, 2011, 2:12:10 PM7/18/11
to Chromium Updater
One more... (#&%§$!!!)

Google Groups kills my script lines by wrapping! With the exception of
the path definitions and

if exist "%TempCrDir%\mini_installer.exe" del "%TempCrDir%
\mini_installer.exe"

which must be ONE line, there is only ONE line of script under each
comment! Remove any CR/LFs in the wrapped lines.

Cheers!
Ralph

Саша Стефановић

unread,
Jul 18, 2011, 5:39:26 PM7/18/11
to chromium...@googlegroups.com
I' using even "dirtier" script, edited some old from net. Here is the code (also you need wget.exe from site from your first msg)

echo #### Finding latest build ####
set /p cr_latest= < LATEST
if exist CURRENT (set /p cr_current= < CURRENT) else (set cr_current=NONE )
echo #### Latest build is %cr_latest%, yours is %cr_current%####
if %cr_current% == %cr_latest% (goto :uptodate) else (goto :update)
:uptodate
echo #### Your build is the latest, no need to update. ####
goto :promptlaunch
:update
echo #### Starting update. Downloading new build (%cr_latest%) ####
echo #### Turning off current chrome.exe processes ####
taskkill /f /im chrome.exe
echo #### Installing new build ####
start mini_installer.exe
echo #### Chromium has been updated from %cr_current%to %cr_latest%. ####
echo %cr_latest% > CURRENT
echo #### Launching chromium ####

Sten Heinze

unread,
Jul 22, 2011, 11:45:32 PM7/22/11
to Chromium Updater
Hi all,

after waiting long for an updated version, I wrote a small application
myself. It is less fancy than the original, but it downloads and
updates Chromium. I put more information and the download link at:
http://libzi.blogspot.com/2011/07/chromium-updater.html

HTH,
Sten
> "%wgetDir%\wget.exe" -P "%TempCrDir%"http://build.chromium.org/f/chromium/snapshots/Win/%CURRENT%/mini_ins...

Trần Trung Thành

unread,
Jul 23, 2011, 2:38:22 PM7/23/11
to chromium...@googlegroups.com


sorry to say that it does not work !! do I need to install somet
hing ??
--
Best Wishes

Sten Heinze

unread,
Jul 24, 2011, 2:11:39 AM7/24/11
to chromium...@googlegroups.com
2011/7/23 Trần Trung Thành <lovel...@gmail.com>:

> On Friday, July 22, 2011 20:45:32 PM, Sten Heinze wrote:
>>
>> Hi all,
>>
>> after waiting long for an updated version, I wrote a small application
>> myself. It is less fancy than the original, but it downloads and
>> updates Chromium. I put more information and the download link at:
>> http://libzi.blogspot.com/2011/07/chromium-updater.html
>>
>> HTH,
>> Sten
>
> sorry to say that it does not work !! do I need to install somet
> hing ??
> --
> Best Wishes
>

Please try again, I fixed two bugs. The application requires .Net 3.5,
if you do not have it, you need to install it.

Sten

Trần Trung Thành

unread,
Jul 24, 2011, 3:40:11 AM7/24/11
to chromium...@googlegroups.com
It's working !! Nice Work ^^ but have some error :
my computer did not installed Chromium, I use your software for
install it and it have error message after installing...
cannot detect chromium version when I check for update again...
should have more feature : change logs, update programs...
anyway, thanks for your software ^^

--
Best Wishes

Sten Heinze

unread,
Jul 24, 2011, 11:32:02 AM7/24/11
to chromium...@googlegroups.com
2011/7/24 Trần Trung Thành <lovel...@gmail.com>:

It does not get the Chromium version yet, it always shows 'unknown'.
But that is independent from the install being successful. If Chromium
was installed, the log should show 'Finished installing Chromium' and
Chromium should be in your Windows Start Menu. If you have an error
message in the log, can you send me the log?

Sten

Thierry Bertho

unread,
Jul 24, 2011, 11:43:30 AM7/24/11
to chromium...@googlegroups.com
stop

2011/7/24 Sten Heinze <sten....@gmail.com>

Trần Trung Thành

unread,
Jul 24, 2011, 12:05:53 PM7/24/11
to chromium...@googlegroups.com
It works like you said... And the error massage : at the second time I
installed Chromium (update), it don't have the error massage. I think it
only appear on the first time install Chromium.

--
Best Wishes

Sten Heinze

unread,
Aug 4, 2011, 12:49:13 AM8/4/11
to chromium...@googlegroups.com
A new version of my application is available. It allows to install
Chromium from different channels, currently from Snapshot, Webkit and
Continuous channels. It can be downloaded at:
http://libzi.blogspot.com/2011/07/chromium-updater.html

Sten

Reply all
Reply to author
Forward
0 new messages