PROCESS_INFORMATION temp_process_info = {};
+ string16 writable_cmdline(cmdline);
if (options.as_user) {
flags |= CREATE_UNICODE_ENVIRONMENT;
void* enviroment_block = NULL;
BOOL launched =
CreateProcessAsUser(options.as_user, NULL,
- const_cast<wchar_t*>(cmdline.c_str()),
+ &writable_cmdline[0],
NULL, NULL, inherit_handles, flags,
enviroment_block, NULL, startup_info,
&temp_process_info);
}
} else {
if (!CreateProcess(NULL,
- const_cast<wchar_t*>(cmdline.c_str()), NULL, NULL,
+ &writable_cmdline[0], NULL, NULL,
inherit_handles, flags, NULL, NULL,
startup_info, &temp_process_info)) {
DPLOG(ERROR) << "Command line:" << std::endl << UTF16ToUTF8(cmdline)