CFile::modeWrite,NULL);
CString m_strCommand=toShortPath(m_strWinDir)+"\\command\\deltree /Y a:\\ \n"+
toShortPath(m_strWinDir)+"\\command\\sys c: a:\n"+
"dir "+getMyDir()+"rescueSys.exe >> "+getMyDir()+"abcdefgh.txt";
f.WriteString(m_strCommand);
f.Close();
WinExec(getMyDir()+"myTemp.bat",SW_HIDE);
CTime m_beginTime=CTime::GetCurrentTime();
CTimeSpan m_timeSpan=CTime::GetCurrentTime()-m_beginTime;
CFileFind finder;
while(!finder.FindFile(getMyDir()+"abcdefgh.txt"))
//如果找到了abcdefgh.txt则说明批处理已经执行完毕.
{
MSG msg;
if(::PeekMessage(&msg,m_hWnd,0,0,PM_REMOVE))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
if(!(m_progress.GetPos()>=100))
m_progress.SetPos(100*m_timeSpan.GetSeconds()/30);
m_timeSpan=CTime::GetCurrentTime()-m_beginTime;
}
m_progress.SetPos(100);
f.Open("a:\\autoexec.bat", CFile::modeCreate(北联网教程,专业提供视频软件下载)
……