运行以下代码后,一切都按照我的意愿进行,除了文件夹显示:test2﷽﷽ꮫꮫꮫꮫﻮﻮﻮ</p>
这里发生了什么?
std::string arrString[3] = {" /C mkdir C:\\Users\\Andrew\\Desktop\\test1"," /C mkdir C:\\Users\\Andrew\\Desktop\\test2"," /C mkdir C:\\Users\\Andrew\\Desktop\\test3"};
LPWSTR cmd =L"C:\\Windows\\System32\\cmd.exe";
int i;
for(i=0; i<3; i++)
{
STARTUPINFO info={sizeof(info)};
PROCESS_INFORMATION processInfo;
vector<wchar_t> cmdline(arrString[i].begin(), arrString[i].end());
CreateProcessW(cmd, &cmdline[0], NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo);
OutputDebugStringW(L"My output\nstring.");
}
}