Friday, February 03, 2006

allow user to register BmpToAvi

Cool idea, but unnecessary: now that the installer correctly handles upgrading (each release must have a new project GUID, but the same upgrade GUID), this situation can't arise anymore.

if (bta.GetLastError() == CBmpToAvi::ERR_CREATE_SOURCE
&& hr == REGDB_E_CLASSNOTREG) {
static const LPCSTR BmpToAviName = "BmpToAvi.ax";
if (AfxMessageBox(IDS_MEX_BTA_INSTALL, MB_YESNO) == IDYES) {
CPathStr path = CMainFrame::GetAppPath();
path.Append(BmpToAviName);
if (PathFileExists(path)) {
CString cmd;
cmd.Format("regsvr32 /s \"%s\"", path);
int retc = system(cmd);
if (retc)
AfxMessageBox(IDS_MEX_BTA_CANT_REG);
else
goto retry;
} else {
CString s;
s.Format(IDS_MEX_BTA_NOT_FOUND, BmpToAviName);
AfxMessageBox(s);
}
}
}

No comments: