从VS2008生成的Win7无法成功安装Mobile Compact Framework 2.0 [英] Mobile Compact Framework 2.0 Install unsuccessful from Win7 generated from VS2008

查看:153
本文介绍了从VS2008生成的Win7无法成功安装Mobile Compact Framework 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将WinMobile5应用程序的VS2005解决方案升级到了VS2008.该解决方案还包含一个CAB构建器项目以及一个MSI Desktop Installer项目.安装程序提供的自定义DLL负责将应用程序以及支持的CAB(例如Compact Framework 2.0,扫描程序库等)部署到实际设备上.

I recently upgraded a VS2005 solution for a WinMobile5 app to VS2008. The solution also contains a CAB builder project plus an MSI Desktop Installer project. A custom DLL from the installer takes care of deploying the app plus supporting CABs, like Compact Framework 2.0, scanner libraries, etc to the actual device.

我将本文用作MSI安装指南:
http://msdn.microsoft.com/en-us/library/aa446504.aspx

I used this article as a guide for MSI installation:
http://msdn.microsoft.com/en-us/library/aa446504.aspx

问题是,运行Setup.exe/MSI文件时,CF2 CAB无法从Win7成功安装到WM5设备.但是,从XP安装可以正常工作.

Problem is, the CF2 CAB won't install successfully to a WM5 device from Win7 when running the Setup.exe / MSI file. However, installing from XP works fine.

摘要:

-Windows7 32位计算机-VS2008/WM6 SDK(包括WM5支持)
-Symbol WM5设备-MC70
-Windows Mobile设备中心
-创建了桌面MSI,可通过自定义DLL安装CF2 CAB以及我的应用的CAB
-在安装(以管理员身份运行)我的应用程序的CAB成功安装期间,CF2 CAB表示安装不成功"
-但是,从VS2008运行/调试应用程序将正确部署CF2,因此它可以正常工作.

-Windows7 32-bit machine - VS2008 / WM6 SDK (includes WM5 support)
-Symbol WM5 Device - MC70
-Windows Mobile Device Center
-Created Desktop MSI to install CF2 CAB plus my app's CAB thru Custom DLL
-During install (running as admin) my app's CAB install successfully, the CF2 CAB says "Installation was unsuccessful"
-However running/debugging the app from VS2008 will deploy CF2 correctly, so it CAN work.

有趣的花絮:
我从设备中拉出了时髦的CF2 CAB,以便与位于此处的源进行比较:

Interesting tidbit:
I pulled back the funky CF2 CAB from the device to compare with source, located here:

C:\ Program Files \ Microsoft.NET \ SDK \ CompactFramework \ v2.0 \ WindowsCE \ wce500 \ armv4i \ NETCFv2.wm.armv4i.cab

C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce500\armv4i\NETCFv2.wm.armv4i.cab

令我惊讶的是,设备CAB的两个十六进制字节与源字节不同.从一开始:

To my surprise, the device CAB had two HEX bytes different than the source. From beginning:

4D 53 43 46 00 00 00 00 68 48 (来自回撤")其余部分相同
4D 53 43 46 00 00 00 00 50 22 (来自来源)休息时间相同

4D 53 43 46 00 00 00 00 68 48 (from Pullback) rest is same
4D 53 43 46 00 00 00 00 50 22 (from Source) rest is same

当我将"68 48" CAB替换为"50 22" CAB并在设备上手动启动时,它可以很好地安装.所以我的问题是:为什么源出租车到达目的地设备后会略有变化?除此之外,文件是相同的.

When I replace the "68 48" CAB with the "50 22" CAB and launch manually on the device, it installs nicely. So my question, is: Why is the source cab slightly altered once it reaches the destination device? Other than that, the files are identical.

我尝试过的其他方法:
从头开始创建一个针对WM5/CF2的小型应用.添加一个CAB项目,添加一个Setup&部署项目.从XP运行安装程序,太好了!从Win7 BOOM运行安装程序!

Other things I've tried:
From scratch creating a small App targeting WM5/CF2. Adding a CAB project, adding a Setup & Deploy project. Run Setup from XP, great! Run Setup from Win7, BOOM!

/设备根目录不包含CF2安装日志.没那么远.
VOLATILE/Setup.log不包含错误".

/Device root does not contain a CF2 Install Log. Doesn't get that far.
VOLATILE/Setup.log contains no "error".

我还尝试了UberCab方法(将多个CAB捆绑到一个CAB中).但是,在设备上解除捆绑时: BOOM 失败.它以某种方式知道.

I've also tried the UberCab approach (bundling multiple CABs into one CAB). However, when unbundling on the device: BOOM fail. It somehow knows.

我快要死了. CF2件应该可以正常工作.

I'm at my wit's end. The CF2 piece should just work.

-汤姆

推荐答案

回顾一下我的CAB安装程序SDK的源代码,我看到CAB的开头是一个固定大小的标头.如您所见,第一个DWORD是CAB签名(0x4643534d little-endian).第二个DWORD是保留集,在您的情况下为全零.下一个 DWORD 是CAB的大小-您只显示低位字,但相差近10k(0x4868-0x2250 = 0x2618).这很可能导致CAB解压缩器失败,因为它正在寻找文件末尾的数据.

Looking back at my source code for the CAB installer SDK, I see that the start of the CAB is a fixed-size header. The first DWORD is a CAB signature (0x4643534d little-endian) like you see. The second DWORD is a reserved set, which in your case is all zeros. The next DWORD is the size of the CAB - you're only showing the lower word, but the difference is nearly 10k (0x4868 - 0x2250 = 0x2618). That is likely causing the CAB decompressor to fail because it's looking for data past the end of the file.

现在为什么正在改变,我不知道.您是否已验证MSI中CAB的来源?您是否已在其他工具中打开MSI并拉出CAB以查看其是否正确?基本上,CAB在源端是错误的(很可能是我认为的),还是在移动时会被修改?

Now why that's changing I don't know. You've verified the source for the CAB in the MSI? Have you openened the MSI in another tool and pulled out the CAB to see if it's right in there? Basically is the CAB wrong at the source side (most likely I think), or is it getting modified when moved?

这篇关于从VS2008生成的Win7无法成功安装Mobile Compact Framework 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆