| Index: base/process/launch_win.cc
|
| diff --git a/base/process/launch_win.cc b/base/process/launch_win.cc
|
| index 1349b3e4af3d101d4515e04d5ae081195e73016a..47e2c7412ac235024f1fa05b7d1816e01afef28d 100644
|
| --- a/base/process/launch_win.cc
|
| +++ b/base/process/launch_win.cc
|
| @@ -272,6 +272,8 @@ Process LaunchProcess(const string16& cmdline,
|
| : options.current_directory.value().c_str();
|
|
|
| string16 writable_cmdline(cmdline);
|
| + const char16* executable_path = !options.real_path.empty() ?
|
| + options.real_path.value().c_str() : nullptr;
|
| if (options.as_user) {
|
| flags |= CREATE_UNICODE_ENVIRONMENT;
|
| void* enviroment_block = nullptr;
|
| @@ -282,8 +284,8 @@ Process LaunchProcess(const string16& cmdline,
|
| }
|
|
|
| BOOL launched = CreateProcessAsUser(
|
| - options.as_user, nullptr, &writable_cmdline[0], nullptr, nullptr,
|
| - inherit_handles, flags, enviroment_block, current_directory,
|
| + options.as_user, executable_path, &writable_cmdline[0], nullptr,
|
| + nullptr, inherit_handles, flags, enviroment_block, current_directory,
|
| startup_info, &temp_process_info);
|
| DestroyEnvironmentBlock(enviroment_block);
|
| if (!launched) {
|
| @@ -292,7 +294,7 @@ Process LaunchProcess(const string16& cmdline,
|
| return Process();
|
| }
|
| } else {
|
| - if (!CreateProcess(nullptr, &writable_cmdline[0], nullptr, nullptr,
|
| + if (!CreateProcess(executable_path, &writable_cmdline[0], nullptr, nullptr,
|
| inherit_handles, flags, nullptr, current_directory,
|
| startup_info, &temp_process_info)) {
|
| DPLOG(ERROR) << "Command line:" << std::endl << UTF16ToUTF8(cmdline)
|
| @@ -322,7 +324,8 @@ Process LaunchProcess(const string16& cmdline,
|
|
|
| Process LaunchElevatedProcess(const CommandLine& cmdline,
|
| const LaunchOptions& options) {
|
| - const string16 file = cmdline.GetProgram().value();
|
| + const string16 file = !options.real_path.empty() ?
|
| + options.real_path.value() : cmdline.GetProgram().value();
|
| const string16 arguments = cmdline.GetArgumentsString();
|
|
|
| SHELLEXECUTEINFO shex_info = {};
|
|
|