diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-10-03 15:52:29 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-10-03 15:52:29 -0700 |
| commit | d5705e87c42784607bf462159bebe14044a88eca (patch) | |
| tree | aded4a5806480ad3e6980b8c5f4dacd61a004614 /toolsrc/src/commands_integrate.cpp | |
| parent | c167c70c272a417779e601fffcbdb72278da1848 (diff) | |
| parent | 3838d5880470fdc884f035ed3d1c67d3bdd1e16e (diff) | |
| download | vcpkg-d5705e87c42784607bf462159bebe14044a88eca.tar.gz vcpkg-d5705e87c42784607bf462159bebe14044a88eca.zip | |
Merge branch 'master' into martin-s-patch-vs2013
Diffstat (limited to 'toolsrc/src/commands_integrate.cpp')
| -rw-r--r-- | toolsrc/src/commands_integrate.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index 1bf26910c..fd2f11294 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -113,19 +113,20 @@ namespace vcpkg::Commands::Integrate static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { - SHELLEXECUTEINFO sh_ex_info = {0}; + SHELLEXECUTEINFOW sh_ex_info = {0}; sh_ex_info.cbSize = sizeof(sh_ex_info); sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; sh_ex_info.hwnd = nullptr; - sh_ex_info.lpVerb = "runas"; - sh_ex_info.lpFile = "cmd"; // Application to start + sh_ex_info.lpVerb = L"runas"; + sh_ex_info.lpFile = L"cmd"; // Application to start - sh_ex_info.lpParameters = param.c_str(); // Additional parameters + auto wparam = Strings::to_utf16(param); + sh_ex_info.lpParameters = wparam.c_str(); // Additional parameters sh_ex_info.lpDirectory = nullptr; sh_ex_info.nShow = SW_HIDE; sh_ex_info.hInstApp = nullptr; - if (!ShellExecuteExA(&sh_ex_info)) + if (!ShellExecuteExW(&sh_ex_info)) { return ElevationPromptChoice::NO; } |
