codeINSTALL_EXIT
Install_Exit(
HWND hwndParent,
LPCTSTR pszInstallDir,
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts
)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
// Start the child process.
if( !CreateProcess( _T("wceload"), // No module name (use command line)
_T("NETCFv35.wm.armv4i.cab"), // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)
{
MessageBox(NULL,_T("CreateProcess failed "+GetLastError()),_T("failed"),1);
return codeINSTALL_EXIT_DONE;
}
// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE )
//CreateProcess(_T("\\Program Files\\SmartDeviceCab\\NETCFv35.wm.armv4i.cab"),NULL,NULL,NULL,FALSE,0,NULL,NULL,NULL,NULL);
//force a refresh of the GAC
CreateProcess(_T("cgacutil.exe"),_T("/refresh"),NULL,NULL,FALSE,0,NULL,NULL,NULL,NULL);
//Uncomment to see when this action occurs
//MessageBox(NULL,_T("GAC was refreshed"),_T("Chapter 6"),1);
return codeINSTALL_EXIT_DONE;
}
if( !CreateProcess( _T("\\windows\\wceload.exe"), // No module name (use command line)
_T("\"\\Your Path\\NETCFv35.wm.armv4i.cab\""), // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)