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.
5 #include "chrome/installer/util/util_constants.h"
11 // Whether to set Chrome to launch at computer startup.
12 const char kAutoLaunchChrome
[] = "auto-launch-chrome";
15 // Currently this is only required when used in combination with kMultiInstall.
16 const char kChrome
[] = "chrome";
18 // Install Chrome App Host. This is now interpreted as kChromeAppLauncher.
19 // TODO(huangs): Remove by M27.
20 const char kChromeAppHostDeprecated
[] = "app-host";
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.
25 const char kChromeAppLauncher
[] = "app-launcher";
27 // Install Chrome Frame.
28 const char kChromeFrame
[] = "chrome-frame";
30 // Run the installer for Chrome SxS.
31 const char kChromeSxS
[] = "chrome-sxs";
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.
37 const char kConfigureUserSettings
[] = "configure-user-settings";
39 // The version number of an update containing critical fixes, for which an
40 // in-use Chrome should be restarted ASAP.
41 const char kCriticalUpdateVersion
[] = "critical-update-version";
43 // Delete user profile data. This param is useful only when specified with
44 // kUninstall, otherwise it is silently ignored.
45 const char kDeleteProfile
[] = "delete-profile";
48 const char kDisableLogging
[] = "disable-logging";
50 // Prevent installer from launching Chrome after a successful first install.
51 const char kDoNotLaunchChrome
[] = "do-not-launch-chrome";
53 // Prevents installer from writing the Google Update key that causes Google
54 // Update to launch Chrome after a first install.
55 const char kDoNotRegisterForUpdateLaunch
[] =
56 "do-not-register-for-update-launch";
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.
61 const char kDoNotRemoveSharedItems
[] = "do-not-remove-shared-items";
63 // Enable logging at the error level. This is the default behavior.
64 const char kEnableLogging
[] = "enable-logging";
66 // Ensures that Google Update is present at the current level of installation.
67 const char kEnsureGoogleUpdatePresent
[] = "ensure-google-update-present";
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
73 const char kForceConfigureUserSettings
[] = "force-configure-user-settings";
75 // If present, setup will uninstall chrome without asking for any
76 // confirmation from user.
77 const char kForceUninstall
[] = "force-uninstall";
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).
83 const char kInstallArchive
[] = "install-archive";
85 // Specify the file path of Chrome master preference file.
86 const char kInstallerData
[] = "installerdata";
88 // If present, specify file path to write logging info.
89 const char kLogFile
[] = "log-file";
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.
95 const char kMakeChromeDefault
[] = "make-chrome-default";
97 // Tells installer to expect to be run as a subsidiary to an MSI.
98 const char kMsi
[] = "msi";
100 // Tells installer to install multiple products specified on the command line.
101 // (e.g. Chrome Frame, Chrome)
102 const char kMultiInstall
[] = "multi-install";
104 // Useful only when used with --update-setup-exe, otherwise ignored. It
105 // specifies the full path where updated setup.exe will be stored.
106 const char kNewSetupExe
[] = "new-setup-exe";
108 // Notify the installer that the OS has been upgraded.
109 const char kOnOsUpgrade
[] = "on-os-upgrade";
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.
113 const char kQueryEULAAcceptance
[] = "query-eula-acceptance";
115 // Register Chrome as a valid browser on the current sytem. This option
116 // requires that setup.exe is running as admin. If this option is specified,
117 // options kInstallArchive and kUninstall are ignored.
118 const char kRegisterChromeBrowser
[] = "register-chrome-browser";
120 // Used by the installer to forward the registration suffix of the
121 // (un)installation in progress when launching an elevated setup.exe to finish
122 // registration work.
123 const char kRegisterChromeBrowserSuffix
[] = "register-chrome-browser-suffix";
125 // Specify the path to the dev build of chrome.exe the user wants to install
126 // (register and install Start menu shortcut for) on the system. This will
127 // always result in a user-level install and will make this install default
129 const char kRegisterDevChrome
[] = "register-dev-chrome";
131 // Switch to allow an extra URL protocol to be registered. This option is used
132 // in conjunction with kRegisterChromeBrowser to specify an extra protocol
133 // in addition to the standard set of protocols.
134 const char kRegisterURLProtocol
[] = "register-url-protocol";
136 // Renames chrome.exe to old_chrome.exe and renames new_chrome.exe to chrome.exe
137 // to support in-use updates. Also deletes opv key.
138 const char kRenameChromeExe
[] = "rename-chrome-exe";
140 // Removes Chrome registration from current machine. Requires admin rights.
141 const char kRemoveChromeRegistration
[] = "remove-chrome-registration";
143 // When we try to relaunch setup.exe as admin on Vista, we append this command
144 // line flag so that we try the launch only once.
145 const char kRunAsAdmin
[] = "run-as-admin";
147 // Combined with --uninstall, signals to setup.exe that this uninstall was
148 // triggered by a self-destructing Chrome.
149 const char kSelfDestruct
[] = "self-destruct";
151 // Install Chrome to system wise location. The default is per user install.
152 const char kSystemLevel
[] = "system-level";
154 // If present, setup will uninstall chrome.
155 const char kUninstall
[] = "uninstall";
157 // Also see --new-setup-exe. This command line option specifies a diff patch
158 // that setup.exe will apply to itself and store the resulting binary in the
159 // path given by --new-setup-exe.
160 const char kUpdateSetupExe
[] = "update-setup-exe";
162 // Use the given uncompressed chrome.7z archive as the source of files to
164 const char kUncompressedArchive
[] = "uncompressed-archive";
166 // Enable verbose logging (info level).
167 const char kVerboseLogging
[] = "verbose-logging";
169 // Show the embedded EULA dialog.
170 const char kShowEula
[] = "show-eula";
172 // Show the embedded EULA dialog, relaunch metro Chrome on acceptance.
173 const char kShowEulaForMetro
[] = "show-eula-for-metro";
175 // Perform the inactive user toast experiment.
176 const char kInactiveUserToast
[] = "inactive-user-toast";
178 // User toast experiment switch from system context to user context.
179 const char kSystemLevelToast
[] = "system-level-toast";
181 // The group this experiment belongs to.
182 const char kExperimentGroup
[] = "experiment-group";
184 // A handle value of the key to write the results of the toast experiment
185 // to. See DuplicateGoogleUpdateSystemClientKey for details.
186 const char kToastResultsKey
[] = "toast-results-key";
188 // Applies a binary patch to a file. The input, patch, and the output file are
189 // specified as command line arguments following the --patch switch.
190 // Ex: --patch=courgette --input_file='input' --patch_file='patch'
191 // --output_file='output'
192 const char kPatch
[] = "patch";
193 const char kInputFile
[] = "input-file";
194 const char kPatchFile
[] = "patch-file";
195 const char kOutputFile
[] = "output-file";
197 } // namespace switches
199 // The Active Setup executable will be an identical copy of setup.exe; this is
200 // necessary because Windows' installer detection heuristics (which include
201 // things like process name being "setup.exe") will otherwise force elevation
202 // for non-admin users when setup.exe is launched. This is mitigated by adding
203 // requestedExecutionLevel="asInvoker" to setup.exe's manifest on Vista+, but
204 // there is no such manifest entry on Windows XP (which results in
205 // crbug.com/166473).
206 // TODO(gab): Rename setup.exe itself altogether and use the same binary for
208 const wchar_t kActiveSetupExe
[] = L
"chrmstp.exe";
209 const wchar_t kChromeAppHostExe
[] = L
"app_host.exe";
210 const wchar_t kChromeDll
[] = L
"chrome.dll";
211 const wchar_t kChromeChildDll
[] = L
"chrome_child.dll";
212 const wchar_t kChromeExe
[] = L
"chrome.exe";
213 const wchar_t kChromeFrameDll
[] = L
"npchrome_frame.dll";
214 const wchar_t kChromeFrameHelperDll
[] = L
"chrome_frame_helper.dll";
215 const wchar_t kChromeFrameHelperExe
[] = L
"chrome_frame_helper.exe";
216 const wchar_t kChromeFrameHelperWndClass
[] = L
"ChromeFrameHelperWindowClass";
217 const wchar_t kChromeLauncherExe
[] = L
"chrome_launcher.exe";
218 const wchar_t kChromeNewExe
[] = L
"new_chrome.exe";
219 const wchar_t kChromeOldExe
[] = L
"old_chrome.exe";
220 const wchar_t kCmdInstallApp
[] = L
"install-application";
221 const wchar_t kCmdInstallExtension
[] = L
"install-extension";
222 const wchar_t kCmdOnOsUpgrade
[] = L
"on-os-upgrade";
223 const wchar_t kCmdQueryEULAAcceptance
[] = L
"query-eula-acceptance";
224 const wchar_t kCmdQuickEnableApplicationHost
[] =
225 L
"quick-enable-application-host";
226 const wchar_t kCmdQuickEnableCf
[] = L
"quick-enable-cf";
227 const wchar_t kDelegateExecuteExe
[] = L
"delegate_execute.exe";
228 const wchar_t kEULASentinelFile
[] = L
"EULA Accepted";
229 const wchar_t kGoogleChromeInstallSubDir1
[] = L
"Google";
230 const wchar_t kGoogleChromeInstallSubDir2
[] = L
"Chrome";
231 const wchar_t kInstallBinaryDir
[] = L
"Application";
232 const wchar_t kInstallerDir
[] = L
"Installer";
233 const wchar_t kInstallTempDir
[] = L
"Temp";
234 const wchar_t kInstallUserDataDir
[] = L
"User Data";
235 const wchar_t kLnkExt
[] = L
".lnk";
236 const wchar_t kNaClExe
[] = L
"nacl64.exe";
237 const wchar_t kSetupExe
[] = L
"setup.exe";
238 const wchar_t kSxSSuffix
[] = L
" SxS";
239 const wchar_t kUninstallStringField
[] = L
"UninstallString";
240 const wchar_t kUninstallArgumentsField
[] = L
"UninstallArguments";
241 const wchar_t kUninstallDisplayNameField
[] = L
"DisplayName";
242 const char kUninstallMetricsName
[] = "uninstall_metrics";
243 const wchar_t kUninstallInstallationDate
[] = L
"installation_date";
244 const wchar_t kInstallerError
[] = L
"InstallerError";
245 const wchar_t kInstallerExtraCode1
[] = L
"InstallerExtraCode1";
246 const wchar_t kInstallerResult
[] = L
"InstallerResult";
247 const wchar_t kInstallerResultUIString
[] = L
"InstallerResultUIString";
248 const wchar_t kInstallerSuccessLaunchCmdLine
[] =
249 L
"InstallerSuccessLaunchCmdLine";
251 const wchar_t kOptionMultiInstall
[] = L
"multi-install";
253 // Chrome channel display names.
254 const wchar_t kChromeChannelUnknown
[] = L
"unknown";
255 const wchar_t kChromeChannelCanary
[] = L
"canary";
256 const wchar_t kChromeChannelDev
[] = L
"dev";
257 const wchar_t kChromeChannelBeta
[] = L
"beta";
258 const wchar_t kChromeChannelStable
[] = L
"";
260 const size_t kMaxAppModelIdLength
= 64U;
262 const char kCourgette
[] = "courgette";
263 const char kBsdiff
[] = "bsdiff";
265 } // namespace installer