首页
社区
课程
招聘
[求助]window mobile cab程序安装问题
发表于: 2009-8-14 16:48 5826

[求助]window mobile cab程序安装问题

2009-8-14 16:48
5826
vs生成的cab文件
单是程序安装没有问题。
想在安装程序过程中随便安装.net cf 3.5
使用了cesetup.dll

codeINSTALL_EXIT
Install_Exit(
    HWND    hwndParent,
    LPCTSTR pszInstallDir,
    WORD    cFailedDirs,
    WORD    cFailedFiles,
    WORD    cFailedRegKeys,
    WORD    cFailedRegVals,
    WORD    cFailedShortcuts
)
{
        STARTUPINFO si;
    PROCESS_INFORMATION pi;

    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
    ZeroMemory( &pi, sizeof(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;
}

确认代码已执行到,就是NETCFv35.wm.armv4i.cab没有运行
本人C++新手,代码根据书上改的。
请各位帮忙。

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 209
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
要指定全路径

    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
    )
2009-8-20 00:05
0
游客
登录 | 注册 方可回帖
返回