ENUM_ExtractErrorCode ExtractOfficePackage( LPCTSTR szPkgFilename, LPCTSTR szDestPath, Files &files ) { Files mspfiles, cabfiles, dstfiles; if(!CreateDirectoryNested(szDestPath)) return EE_PATH; if(!ExtractExe(szPkgFilename, szDestPath, mspfiles)) return EE_EXE; for(int i=0; i<mspfiles.size(); ++i) { CString strPath = mspfiles[i]; strPath += UPK_PATH_SUFFIX; if(!CreateDirectoryNested(strPath)) return EE_PATH; if(!ExtractMSP(mspfiles[i], strPath, cabfiles)) return EE_MSP; } for(int i=0; i<cabfiles.size(); ++i) { CString strPath = cabfiles[i]; strPath += UPK_PATH_SUFFIX; if(!CreateDirectoryNested(strPath)) return EE_PATH; if(!ExtractCab(cabfiles[i], strPath, files)) return EE_CAB; } return EE_SUCCESS; }
void InstallerWindow::OnExecBegin() { SetProgress(m_recorded_progress + 1); SetControlValues(); InstallConfiguration * p_configuration = reinterpret_cast<InstallConfiguration *>(get(m_configuration)); CHECK_BOOL(p_configuration != NULL, L"Invalid configuration"); ExtractCab(L"", p_configuration->show_cab_dialog); }