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 Frame.
19 const char kChromeFrame
[] = "chrome-frame";
21 // Run the installer for Chrome SxS.
22 const char kChromeSxS
[] = "chrome-sxs";
24 // Create shortcuts for this user to point to a system-level install (which
25 // must already be installed on the machine). The shortcuts created will
26 // match the preferences of the already present system-level install as such
27 // this option is not compatible with any other installer options.
28 const char kConfigureUserSettings
[] = "configure-user-settings";
30 // The version number of an update containing critical fixes, for which an
31 // in-use Chrome should be restarted ASAP.
32 const char kCriticalUpdateVersion
[] = "critical-update-version";
34 // Delete user profile data. This param is useful only when specified with
35 // kUninstall, otherwise it is silently ignored.
36 const char kDeleteProfile
[] = "delete-profile";
39 const char kDisableLogging
[] = "disable-logging";
41 // Prevent installer from launching Chrome after a successful first install.
42 const char kDoNotLaunchChrome
[] = "do-not-launch-chrome";
44 // Prevents installer from writing the Google Update key that causes Google
45 // Update to launch Chrome after a first install.
46 const char kDoNotRegisterForUpdateLaunch
[] =
47 "do-not-register-for-update-launch";
49 // By default we remove all shared (between users) files, registry entries etc
50 // during uninstall. If this option is specified together with kUninstall option
51 // we do not clean up shared entries otherwise this option is ignored.
52 const char kDoNotRemoveSharedItems
[] = "do-not-remove-shared-items";
54 // Enable logging at the error level. This is the default behavior.
55 const char kEnableLogging
[] = "enable-logging";
57 // Same as kConfigureUserSettings above; except the checks to know whether
58 // first run already occured are bypassed and shortcuts are created either way
59 // (kConfigureUserSettings also needs to be on the command-line for this to have
61 const char kForceConfigureUserSettings
[] = "force-configure-user-settings";
63 // If present, setup will uninstall chrome without asking for any
64 // confirmation from user.
65 const char kForceUninstall
[] = "force-uninstall";
67 // Specify the path to the compressed Chrome archive for install. If not
68 // specified, chrome.packed.7z or chrome.7z in the same directory as setup.exe
69 // is used (the packed file is preferred; see kUncompressedArchive to force use
70 // of an uncompressed archive).
71 const char kInstallArchive
[] = "install-archive";
73 // Specify the file path of Chrome master preference file.
74 const char kInstallerData
[] = "installerdata";
76 // If present, specify file path to write logging info.
77 const char kLogFile
[] = "log-file";
79 // Register Chrome as default browser on the system. Usually this will require
80 // that setup is running as admin. If running as admin we try to register
81 // as default browser at system level, if running as non-admin we try to
82 // register as default browser only for the current user.
83 const char kMakeChromeDefault
[] = "make-chrome-default";
85 // Tells installer to expect to be run as a subsidiary to an MSI.
86 const char kMsi
[] = "msi";
88 // Tells installer to install multiple products specified on the command line.
89 // (e.g. Chrome Frame, Chrome)
90 const char kMultiInstall
[] = "multi-install";
92 // Useful only when used with --update-setup-exe, otherwise ignored. It
93 // specifies the full path where updated setup.exe will be stored.
94 const char kNewSetupExe
[] = "new-setup-exe";
96 // Notify the installer that the OS has been upgraded.
97 const char kOnOsUpgrade
[] = "on-os-upgrade";
99 // Requests that setup attempt to reenable autoupdates for Chrome.
100 const char kReenableAutoupdates
[] = "reenable-autoupdates";
102 // Register Chrome as a valid browser on the current system. This option
103 // requires that setup.exe is running as admin. If this option is specified,
104 // options kInstallArchive and kUninstall are ignored.
105 const char kRegisterChromeBrowser
[] = "register-chrome-browser";
107 // Used by the installer to forward the registration suffix of the
108 // (un)installation in progress when launching an elevated setup.exe to finish
109 // registration work.
110 const char kRegisterChromeBrowserSuffix
[] = "register-chrome-browser-suffix";
112 // Specify the path to the dev build of chrome.exe the user wants to install
113 // (register and install Start menu shortcut for) on the system. This will
114 // always result in a user-level install and will make this install default
116 const char kRegisterDevChrome
[] = "register-dev-chrome";
118 // Switch to allow an extra URL protocol to be registered. This option is used
119 // in conjunction with kRegisterChromeBrowser to specify an extra protocol
120 // in addition to the standard set of protocols.
121 const char kRegisterURLProtocol
[] = "register-url-protocol";
123 // Renames chrome.exe to old_chrome.exe and renames new_chrome.exe to chrome.exe
124 // to support in-use updates. Also deletes opv key.
125 const char kRenameChromeExe
[] = "rename-chrome-exe";
127 // Removes Chrome registration from current machine. Requires admin rights.
128 const char kRemoveChromeRegistration
[] = "remove-chrome-registration";
130 // When we try to relaunch setup.exe as admin on Vista, we append this command
131 // line flag so that we try the launch only once.
132 const char kRunAsAdmin
[] = "run-as-admin";
134 // Combined with --uninstall, signals to setup.exe that this uninstall was
135 // triggered by a self-destructing Chrome.
136 const char kSelfDestruct
[] = "self-destruct";
138 // Install Chrome to system wise location. The default is per user install.
139 const char kSystemLevel
[] = "system-level";
141 // Signals to setup.exe that it should trigger the active setup command.
142 const char kTriggerActiveSetup
[] = "trigger-active-setup";
144 // If present, setup will uninstall chrome.
145 const char kUninstall
[] = "uninstall";
147 // Also see --new-setup-exe. This command line option specifies a diff patch
148 // that setup.exe will apply to itself and store the resulting binary in the
149 // path given by --new-setup-exe.
150 const char kUpdateSetupExe
[] = "update-setup-exe";
152 // Use the given uncompressed chrome.7z archive as the source of files to
154 const char kUncompressedArchive
[] = "uncompressed-archive";
156 // Enable verbose logging (info level).
157 const char kVerboseLogging
[] = "verbose-logging";
159 // Show the embedded EULA dialog.
160 const char kShowEula
[] = "show-eula";
162 // Show the embedded EULA dialog, relaunch metro Chrome on acceptance.
163 const char kShowEulaForMetro
[] = "show-eula-for-metro";
165 // Perform the inactive user toast experiment.
166 const char kInactiveUserToast
[] = "inactive-user-toast";
168 // User toast experiment switch from system context to user context.
169 const char kSystemLevelToast
[] = "system-level-toast";
171 // The group this experiment belongs to.
172 const char kExperimentGroup
[] = "experiment-group";
174 // A handle value of the key to write the results of the toast experiment
175 // to. See DuplicateGoogleUpdateSystemClientKey for details.
176 const char kToastResultsKey
[] = "toast-results-key";
178 // Applies a binary patch to a file. The input, patch, and the output file are
179 // specified as command line arguments following the --patch switch.
180 // Ex: --patch=courgette --input_file='input' --patch_file='patch'
181 // --output_file='output'
182 const char kPatch
[] = "patch";
183 const char kInputFile
[] = "input-file";
184 const char kPatchFile
[] = "patch-file";
185 const char kOutputFile
[] = "output-file";
187 } // namespace switches
189 // The Active Setup executable will be an identical copy of setup.exe; this is
190 // necessary because Windows' installer detection heuristics (which include
191 // things like process name being "setup.exe") will otherwise force elevation
192 // for non-admin users when setup.exe is launched. This is mitigated by adding
193 // requestedExecutionLevel="asInvoker" to setup.exe's manifest on Vista+, but
194 // there is no such manifest entry on Windows XP (which results in
195 // crbug.com/166473).
196 // TODO(gab): Rename setup.exe itself altogether and use the same binary for
198 const wchar_t kActiveSetupExe
[] = L
"chrmstp.exe";
199 const wchar_t kAppLauncherGuid
[] = L
"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}";
200 const wchar_t kChromeDll
[] = L
"chrome.dll";
201 const wchar_t kChromeChildDll
[] = L
"chrome_child.dll";
202 const wchar_t kChromeExe
[] = L
"chrome.exe";
203 const wchar_t kChromeFrameDll
[] = L
"npchrome_frame.dll";
204 const wchar_t kChromeFrameHelperDll
[] = L
"chrome_frame_helper.dll";
205 const wchar_t kChromeFrameHelperExe
[] = L
"chrome_frame_helper.exe";
206 const wchar_t kChromeFrameHelperWndClass
[] = L
"ChromeFrameHelperWindowClass";
207 const wchar_t kChromeLauncherExe
[] = L
"chrome_launcher.exe";
208 const wchar_t kChromeMetroDll
[] = L
"metro_driver.dll";
209 const wchar_t kChromeNewExe
[] = L
"new_chrome.exe";
210 const wchar_t kChromeOldExe
[] = L
"old_chrome.exe";
211 const wchar_t kCmdOnOsUpgrade
[] = L
"on-os-upgrade";
212 const wchar_t kCmdQuickEnableCf
[] = L
"quick-enable-cf";
213 const wchar_t kDelegateExecuteExe
[] = L
"delegate_execute.exe";
214 const wchar_t kEULASentinelFile
[] = L
"EULA Accepted";
215 const wchar_t kGoogleChromeInstallSubDir1
[] = L
"Google";
216 const wchar_t kGoogleChromeInstallSubDir2
[] = L
"Chrome";
217 const wchar_t kInstallBinaryDir
[] = L
"Application";
218 const wchar_t kInstallerDir
[] = L
"Installer";
219 const wchar_t kInstallTempDir
[] = L
"Temp";
220 const wchar_t kLnkExt
[] = L
".lnk";
221 const wchar_t kNaClExe
[] = L
"nacl64.exe";
222 const wchar_t kSetupExe
[] = L
"setup.exe";
223 const wchar_t kSxSSuffix
[] = L
" SxS";
224 const wchar_t kUninstallStringField
[] = L
"UninstallString";
225 const wchar_t kUninstallArgumentsField
[] = L
"UninstallArguments";
226 const wchar_t kUninstallDisplayNameField
[] = L
"DisplayName";
227 const char kUninstallMetricsName
[] = "uninstall_metrics";
228 const wchar_t kUninstallInstallationDate
[] = L
"installation_date";
229 const wchar_t kInstallerError
[] = L
"InstallerError";
230 const wchar_t kInstallerExtraCode1
[] = L
"InstallerExtraCode1";
231 const wchar_t kInstallerResult
[] = L
"InstallerResult";
232 const wchar_t kInstallerResultUIString
[] = L
"InstallerResultUIString";
233 const wchar_t kInstallerSuccessLaunchCmdLine
[] =
234 L
"InstallerSuccessLaunchCmdLine";
236 const wchar_t kOptionMultiInstall
[] = L
"multi-install";
238 // Chrome channel display names.
239 const wchar_t kChromeChannelUnknown
[] = L
"unknown";
240 const wchar_t kChromeChannelCanary
[] = L
"canary";
241 const wchar_t kChromeChannelDev
[] = L
"dev";
242 const wchar_t kChromeChannelBeta
[] = L
"beta";
243 const wchar_t kChromeChannelStable
[] = L
"";
244 const wchar_t kChromeChannelStableExplicit
[] = L
"stable";
246 const size_t kMaxAppModelIdLength
= 64U;
248 const char kCourgette
[] = "courgette";
249 const char kBsdiff
[] = "bsdiff";
251 } // namespace installer