3 REM Copyright (c) 2012 The Chromium Authors. All rights reserved.
\r
4 REM Use of this source code is governed by a BSD-style license that can be
\r
5 REM found in the LICENSE file.
\r
9 REM Check if we are running as an Administrator.
\r
10 REM Based on method described at:
\r
11 REM http://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights
\r
12 net session >nul 2>&1
\r
13 if not %errorlevel% equ 0 (
\r
14 echo This script updates the registry and needs to be run as Administrator.
\r
15 echo Right-click "Command Prompt" and select "Run as Administrator" and run
\r
16 echo this script from there.
\r
20 REM Make sure the argument specifies a valid channel.
\r
21 if "_%CHANNEL%_"=="_beta_" goto validarg
\r
22 if "_%CHANNEL%_"=="_stable_" goto validarg
\r
26 set SYSTEM32=%SystemRoot%\system32
\r
27 if "_%PROCESSOR_ARCHITECTURE%_"=="_AMD64_" set SYSTEM32=%SystemRoot%\syswow64
\r
29 set REGKEY="HKLM\SOFTWARE\Google\Update\ClientState\{B210701E-FFC4-49E3-932B-370728C72662}"
\r
32 if "_%CHANNEL%_"=="_stable_" (
\r
33 %SYSTEM32%\reg.exe delete %REGKEY% /v %VALUENAME% /f
\r
34 echo ********************
\r
35 echo You're not done yet!
\r
36 echo ********************
\r
37 echo You must now UNINSTALL and RE-INSTALL the latest version of Chrome
\r
38 echo Remote Desktop to get your machine back on the stable channel.
\r
41 %SYSTEM32%\reg.exe add %REGKEY% /v %VALUENAME% /d %CHANNEL% /f
\r
42 echo Switch to %CHANNEL% channel complete.
\r
43 echo You will automatically get %CHANNEL% binaries during the next update.
\r
48 echo Usage: %0 ^<channel^>
\r
49 echo where ^<channel^> is 'beta' or 'stable'.
\r