平台:WinCE>NET4.2 开发平台EVC4.2
目的: 运行 wceload.exe打开SD卡里面的Main.CAB自动安装文件,而且是在后台安装,就是不是显示有关安装信息.
结果: 我实验的时候wceload.exe是运行了,但是Main.CAB没有打开。
代码如下:请高手指点,错在哪里?
SHELLEXECUTEINFO sei;
ZeroMemory(&sei, sizeof(SHELLEXECUTEINFO));
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
sei.lpVerb = NULL/*_T("Open")*/;
sei.lpFile =L"\\Windows\\wceload.exe" ;
sei.lpParameters=L"\\SDMMC DISK\\Main.CAB";
sei.nShow = SW_HIDE/*SW_SHOW*/;
ShellExecuteEx(&sei);
还有个方法 createprocess 会的朋友也请指点一二.
------解决方案--------------------
首先你要检查CAB是否能正确安装。
What kind of platform are you running on? If it's a WM 5.0 or Smartphone device. Use:
wceload.exe "cabfile.cab" /silent
/noask /noui is for Pocket PC 2003 and older....Notice that "silent" is in placed in the end....
Does this help you?