util_constants.cc revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include "chrome/installer/util/util_constants.h" 6 7namespace installer { 8 9namespace switches { 10 11// Whether to set Chrome to launch at computer startup. 12const char kAutoLaunchChrome[] = "auto-launch-chrome"; 13 14// Install Chrome. 15// Currently this is only required when used in combination with kMultiInstall. 16const char kChrome[] = "chrome"; 17 18// Install Chrome App Host. This is now interpreted as kChromeAppLauncher. 19// TODO(huangs): Remove by M27. 20const char kChromeAppHostDeprecated[] = "app-host"; 21 22// Install Chrome App Launcher, which subsumes Chrome App Host, i.e., 23// App Launcher install converts App Host to App Launcher, and all subsequent 24// App Host updates/uninstalls become App Launcher updates/uninstalls. 25const char kChromeAppLauncher[] = "app-launcher"; 26 27// Install Chrome Frame. 28const char kChromeFrame[] = "chrome-frame"; 29 30// Run the installer for Chrome SxS. 31const char kChromeSxS[] = "chrome-sxs"; 32 33// Create shortcuts for this user to point to a system-level install (which 34// must already be installed on the machine). The shortcuts created will 35// match the preferences of the already present system-level install as such 36// this option is not compatible with any other installer options. 37const char kConfigureUserSettings[] = "configure-user-settings"; 38 39// The version number of an update containing critical fixes, for which an 40// in-use Chrome should be restarted ASAP. 41const char kCriticalUpdateVersion[] = "critical-update-version"; 42 43// Delete user profile data. This param is useful only when specified with 44// kUninstall, otherwise it is silently ignored. 45const char kDeleteProfile[] = "delete-profile"; 46 47// Disable logging 48const char kDisableLogging[] = "disable-logging"; 49 50// Prevent installer from launching Chrome after a successful first install. 51const char kDoNotLaunchChrome[] = "do-not-launch-chrome"; 52 53// Prevents installer from writing the Google Update key that causes Google 54// Update to launch Chrome after a first install. 55const char kDoNotRegisterForUpdateLaunch[] = 56 "do-not-register-for-update-launch"; 57 58// By default we remove all shared (between users) files, registry entries etc 59// during uninstall. If this option is specified together with kUninstall option 60// we do not clean up shared entries otherwise this option is ignored. 61const char kDoNotRemoveSharedItems[] = "do-not-remove-shared-items"; 62 63// Enable logging at the error level. This is the default behavior. 64const char kEnableLogging[] = "enable-logging"; 65 66// Ensures that Google Update is present at the current level of installation. 67const char kEnsureGoogleUpdatePresent[] = "ensure-google-update-present"; 68 69// Same as kConfigureUserSettings above; except the checks to know whether 70// first run already occured are bypassed and shortcuts are created either way 71// (kConfigureUserSettings also needs to be on the command-line for this to have 72// any effect). 73const char kForceConfigureUserSettings[] = "force-configure-user-settings"; 74 75// If present, setup will uninstall chrome without asking for any 76// confirmation from user. 77const char kForceUninstall[] = "force-uninstall"; 78 79// Specify the path to the compressed Chrome archive for install. If not 80// specified, chrome.packed.7z or chrome.7z in the same directory as setup.exe 81// is used (the packed file is preferred; see kUncompressedArchive to force use 82// of an uncompressed archive). 83const char kInstallArchive[] = "install-archive"; 84 85// Specify the file path of Chrome master preference file. 86const char kInstallerData[] = "installerdata"; 87 88// If present, specify file path to write logging info. 89const char kLogFile[] = "log-file"; 90 91// Register Chrome as default browser on the system. Usually this will require 92// that setup is running as admin. If running as admin we try to register 93// as default browser at system level, if running as non-admin we try to 94// register as default browser only for the current user. 95const char kMakeChromeDefault[] = "make-chrome-default"; 96 97// Tells installer to expect to be run as a subsidiary to an MSI. 98const char kMsi[] = "msi"; 99 100// Tells installer to install multiple products specified on the command line. 101// (e.g. Chrome Frame, Chrome) 102const char kMultiInstall[] = "multi-install"; 103 104// Useful only when used with --update-setup-exe, otherwise ignored. It 105// specifies the full path where updated setup.exe will be stored. 106const char kNewSetupExe[] = "new-setup-exe"; 107 108// Notify the installer that the OS has been upgraded. 109const char kOnOsUpgrade[] = "on-os-upgrade"; 110 111// Determines whether or not EULA has been accepted at some point. Returns via 112// exit code: 0 if EULA not accepted, 1 if EULA accepted, and E_FAIL on error. 113const char kQueryEULAAcceptance[] = "query-eula-acceptance"; 114 115// Requests that setup attempt to reenable autoupdates for Chrome. 116const char kReenableAutoupdates[] = "reenable-autoupdates"; 117 118// Register Chrome as a valid browser on the current system. This option 119// requires that setup.exe is running as admin. If this option is specified, 120// options kInstallArchive and kUninstall are ignored. 121const char kRegisterChromeBrowser[] = "register-chrome-browser"; 122 123// Used by the installer to forward the registration suffix of the 124// (un)installation in progress when launching an elevated setup.exe to finish 125// registration work. 126const char kRegisterChromeBrowserSuffix[] = "register-chrome-browser-suffix"; 127 128// Specify the path to the dev build of chrome.exe the user wants to install 129// (register and install Start menu shortcut for) on the system. This will 130// always result in a user-level install and will make this install default 131// browser. 132const char kRegisterDevChrome[] = "register-dev-chrome"; 133 134// Switch to allow an extra URL protocol to be registered. This option is used 135// in conjunction with kRegisterChromeBrowser to specify an extra protocol 136// in addition to the standard set of protocols. 137const char kRegisterURLProtocol[] = "register-url-protocol"; 138 139// Renames chrome.exe to old_chrome.exe and renames new_chrome.exe to chrome.exe 140// to support in-use updates. Also deletes opv key. 141const char kRenameChromeExe[] = "rename-chrome-exe"; 142 143// Removes Chrome registration from current machine. Requires admin rights. 144const char kRemoveChromeRegistration[] = "remove-chrome-registration"; 145 146// When we try to relaunch setup.exe as admin on Vista, we append this command 147// line flag so that we try the launch only once. 148const char kRunAsAdmin[] = "run-as-admin"; 149 150// Combined with --uninstall, signals to setup.exe that this uninstall was 151// triggered by a self-destructing Chrome. 152const char kSelfDestruct[] = "self-destruct"; 153 154// Install Chrome to system wise location. The default is per user install. 155const char kSystemLevel[] = "system-level"; 156 157// Signals to setup.exe that it should trigger the active setup command. 158const char kTriggerActiveSetup[] = "trigger-active-setup"; 159 160// If present, setup will uninstall chrome. 161const char kUninstall[] = "uninstall"; 162 163// Also see --new-setup-exe. This command line option specifies a diff patch 164// that setup.exe will apply to itself and store the resulting binary in the 165// path given by --new-setup-exe. 166const char kUpdateSetupExe[] = "update-setup-exe"; 167 168// Use the given uncompressed chrome.7z archive as the source of files to 169// install. 170const char kUncompressedArchive[] = "uncompressed-archive"; 171 172// Enable verbose logging (info level). 173const char kVerboseLogging[] = "verbose-logging"; 174 175// Show the embedded EULA dialog. 176const char kShowEula[] = "show-eula"; 177 178// Show the embedded EULA dialog, relaunch metro Chrome on acceptance. 179const char kShowEulaForMetro[] = "show-eula-for-metro"; 180 181// Perform the inactive user toast experiment. 182const char kInactiveUserToast[] = "inactive-user-toast"; 183 184// User toast experiment switch from system context to user context. 185const char kSystemLevelToast[] = "system-level-toast"; 186 187// The group this experiment belongs to. 188const char kExperimentGroup[] = "experiment-group"; 189 190// A handle value of the key to write the results of the toast experiment 191// to. See DuplicateGoogleUpdateSystemClientKey for details. 192const char kToastResultsKey[] = "toast-results-key"; 193 194// Applies a binary patch to a file. The input, patch, and the output file are 195// specified as command line arguments following the --patch switch. 196// Ex: --patch=courgette --input_file='input' --patch_file='patch' 197// --output_file='output' 198const char kPatch[] = "patch"; 199const char kInputFile[] = "input-file"; 200const char kPatchFile[] = "patch-file"; 201const char kOutputFile[] = "output-file"; 202 203} // namespace switches 204 205// The Active Setup executable will be an identical copy of setup.exe; this is 206// necessary because Windows' installer detection heuristics (which include 207// things like process name being "setup.exe") will otherwise force elevation 208// for non-admin users when setup.exe is launched. This is mitigated by adding 209// requestedExecutionLevel="asInvoker" to setup.exe's manifest on Vista+, but 210// there is no such manifest entry on Windows XP (which results in 211// crbug.com/166473). 212// TODO(gab): Rename setup.exe itself altogether and use the same binary for 213// Active Setup. 214const wchar_t kActiveSetupExe[] = L"chrmstp.exe"; 215const wchar_t kAppLauncherGuid[] = L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}"; 216const wchar_t kChromeAppHostExe[] = L"app_host.exe"; 217const wchar_t kChromeDll[] = L"chrome.dll"; 218const wchar_t kChromeChildDll[] = L"chrome_child.dll"; 219const wchar_t kChromeExe[] = L"chrome.exe"; 220const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll"; 221const wchar_t kChromeFrameHelperDll[] = L"chrome_frame_helper.dll"; 222const wchar_t kChromeFrameHelperExe[] = L"chrome_frame_helper.exe"; 223const wchar_t kChromeFrameHelperWndClass[] = L"ChromeFrameHelperWindowClass"; 224const wchar_t kChromeLauncherExe[] = L"chrome_launcher.exe"; 225const wchar_t kChromeMetroDll[] = L"metro_driver.dll"; 226const wchar_t kChromeNewExe[] = L"new_chrome.exe"; 227const wchar_t kChromeOldExe[] = L"old_chrome.exe"; 228const wchar_t kCmdInstallApp[] = L"install-application"; 229const wchar_t kCmdInstallExtension[] = L"install-extension"; 230const wchar_t kCmdOnOsUpgrade[] = L"on-os-upgrade"; 231const wchar_t kCmdQueryEULAAcceptance[] = L"query-eula-acceptance"; 232const wchar_t kCmdQuickEnableApplicationHost[] = 233 L"quick-enable-application-host"; 234const wchar_t kCmdQuickEnableCf[] = L"quick-enable-cf"; 235const wchar_t kDelegateExecuteExe[] = L"delegate_execute.exe"; 236const wchar_t kEULASentinelFile[] = L"EULA Accepted"; 237const wchar_t kGoogleChromeInstallSubDir1[] = L"Google"; 238const wchar_t kGoogleChromeInstallSubDir2[] = L"Chrome"; 239const wchar_t kInstallBinaryDir[] = L"Application"; 240const wchar_t kInstallerDir[] = L"Installer"; 241const wchar_t kInstallTempDir[] = L"Temp"; 242const wchar_t kLnkExt[] = L".lnk"; 243const wchar_t kNaClExe[] = L"nacl64.exe"; 244const wchar_t kSetupExe[] = L"setup.exe"; 245const wchar_t kSxSSuffix[] = L" SxS"; 246const wchar_t kUninstallStringField[] = L"UninstallString"; 247const wchar_t kUninstallArgumentsField[] = L"UninstallArguments"; 248const wchar_t kUninstallDisplayNameField[] = L"DisplayName"; 249const char kUninstallMetricsName[] = "uninstall_metrics"; 250const wchar_t kUninstallInstallationDate[] = L"installation_date"; 251const wchar_t kInstallerError[] = L"InstallerError"; 252const wchar_t kInstallerExtraCode1[] = L"InstallerExtraCode1"; 253const wchar_t kInstallerResult[] = L"InstallerResult"; 254const wchar_t kInstallerResultUIString[] = L"InstallerResultUIString"; 255const wchar_t kInstallerSuccessLaunchCmdLine[] = 256 L"InstallerSuccessLaunchCmdLine"; 257 258const wchar_t kOptionMultiInstall[] = L"multi-install"; 259 260// Chrome channel display names. 261const wchar_t kChromeChannelUnknown[] = L"unknown"; 262const wchar_t kChromeChannelCanary[] = L"canary"; 263const wchar_t kChromeChannelDev[] = L"dev"; 264const wchar_t kChromeChannelBeta[] = L"beta"; 265const wchar_t kChromeChannelStable[] = L""; 266const wchar_t kChromeChannelStableExplicit[] = L"stable"; 267 268const size_t kMaxAppModelIdLength = 64U; 269 270const char kCourgette[] = "courgette"; 271const char kBsdiff[] = "bsdiff"; 272 273} // namespace installer 274