diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 22:37:32 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 22:37:32 +0000 |
commit | 85eaa3893f49b5574a1521c94da65d53336178d7 (patch) | |
tree | 0093571c8a74f9e96e6d71b573f9ab84714b6f00 /remoting | |
parent | d9e3a4652cb1c348546c85db4295550fdd7a80cb (diff) | |
download | chromium_src-85eaa3893f49b5574a1521c94da65d53336178d7.zip chromium_src-85eaa3893f49b5574a1521c94da65d53336178d7.tar.gz chromium_src-85eaa3893f49b5574a1521c94da65d53336178d7.tar.bz2 |
[Chromoting] Script to switch release channels on Windows.
Review URL: https://chromiumcodereview.appspot.com/11145028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/tools/win/chromoting-set-channel.bat | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/remoting/tools/win/chromoting-set-channel.bat b/remoting/tools/win/chromoting-set-channel.bat new file mode 100644 index 0000000..35c03fa --- /dev/null +++ b/remoting/tools/win/chromoting-set-channel.bat @@ -0,0 +1,49 @@ +@echo off
+
+REM Copyright (c) 2012 The Chromium Authors. All rights reserved.
+REM Use of this source code is governed by a BSD-style license that can be
+REM found in the LICENSE file.
+
+set CHANNEL=%1
+
+REM Check if we are running as an Administrator.
+REM Based on method described at:
+REM http://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights
+net session >nul 2>&1
+if not %errorlevel% equ 0 (
+ echo This script updates the registry and needs to be run as Administrator.
+ echo Right-click "Command Prompt" and select "Run as Administrator" and run
+ echo this script from there.
+ goto :eof
+)
+
+REM Make sure the argument specifies a valid channel.
+if "_%CHANNEL%_"=="_beta_" goto validarg
+if "_%CHANNEL%_"=="_stable_" goto validarg
+goto usage
+
+:validarg
+set SYSTEM32=%SystemRoot%\system32
+if "_%PROCESSOR_ARCHITECTURE%_"=="_AMD64_" set SYSTEM32=%SystemRoot%\syswow64
+
+set REGKEY="HKLM\SOFTWARE\Google\Update\ClientState\{B210701E-FFC4-49E3-932B-370728C72662}"
+set VALUENAME=ap
+
+if "_%CHANNEL%_"=="_stable_" (
+ %SYSTEM32%\reg.exe delete %REGKEY% /v %VALUENAME% /f
+ echo ********************
+ echo You're not done yet!
+ echo ********************
+ echo You must now UNINSTALL and RE-INSTALL the latest version of Chrome
+ echo Remote Desktop to get your machine back on the stable channel.
+ echo Thank you!
+) else (
+ %SYSTEM32%\reg.exe add %REGKEY% /v %VALUENAME% /d %CHANNEL% /f
+ echo Switch to %CHANNEL% channel complete.
+ echo You will automatically get %CHANNEL% binaries during the next update.
+)
+goto :eof
+
+:usage
+echo Usage: %0 ^<channel^>
+echo where ^<channel^> is 'beta' or 'stable'.
|