ShellExecute无法将参数传递给chrome.exe

时间:2014-03-13 11:37:11

标签: c++ visual-c++ window

我可以在我的笔记本电脑中传递参数--user-data-dir=“”,但在我朋友的电话中失败。

我想设置不同的--user-data-dir来登录多用户的网站 同一时间。

CString param=agent+_T("-in-process-plugins --url m.xiaomi.com/home/index.html ")+datadir;
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = _T("open");
ShExecInfo.lpFile = exename;
ShExecInfo.lpParameters = param;
ShExecInfo.lpDirectory =filedir;
ShExecInfo.nShow = SW_SHOWNORMAL;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);

0 个答案:

没有答案