CString strPath = m_sPath + "YYreg.exe";
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset(&si,0,sizeof(si));
si.cb = sizeof(si);
si.wShowWindow = SW_SHOW;
si.dwFlags = STARTF_USESHOWWINDOW;
BOOL fRet = CreateProcess(
NULL,
strPath.GetBuffer(strPath.GetLength()),
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS|CREATE_NEW_CONSOLE,
NULL,
NULL,
&si,
&pi);
strPath.ReleaseBuffer(0);
if (fRet)
{
//打開成功
}