Windows Mobile有关制作和安装cab文件

本文提供了一步一步的指南,详细介绍了如何制作、部署、卸载以及制作INF文件来安装WindowsMobile设备上的CAB文件。包括使用特定工具软件,如WinCECABManager,来生成CAB包,以及如何通过USB连接PC来安装这些包。教程还覆盖了制作INF文件的详细说明,包括如何配置各种设置以满足不同的安装需求。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

制作cab文件,快捷方式以及中文字符等内容:

http://www.haogongju.net/art/1038843

 

介绍如何.msi安装程序部署多个.cab安装包到Windows Mobile设备上。

Deploying .NET Compact Framework 2.0 Applications with .cab and .msi Files
Developing and Deploying Pocket PC Setup Applications

制作不会提示用户选择安装路径的.cab安装文件。

Making a CAB file which doesn’t prompt for installation location

通过编程的方式卸载Windows Mobile应用程序(使用Uninstall Configuration Service Provider)。

Uninstalling Applications Programmatically in Windows Mobile

 

PPC上CAB安装包制作教材与软件分享:

一、工具软件
要在Wince安装程序,则需要制作*.cab安装包。制作*.cab安装包,需要专门的制作工具软件,最常用的也是用得最多的是WinCE CAB Manager

二、制作及安装过程

第一步:先制作.inf文件
要制作.cab安装包,你只要写一个.inf文件,也可以用的文本编辑工具制作,还有准备好你要安装到PPC的各个文件、程序。
第二步:生成CAB包
只要在WinCE CAB Manager中打开你的INF文件,WinCE CAB Manager会根据你的这个INF文件来生成*.CAB文件。你只需要把它保存起来就行了
第四步:连接手机通过USB连接PC,运行*.ARM.CAB文件

三、制作INF文件说明

第一个字段[Version]
中Provider大家可以随便改,其他两个参数就不要去碰了。
第二个字段[CEStings]
CompanyName="bbs.ucweb.com"
AppName="PPC"
InstallDir=\UserData\myoa
说明:
CompanyName是公司名字,可以任意修改。
AppName是应用程序名字,可以任意修改。
InstallDir是应用程序安装的Wince终端的路径,可以任意修改。
第三个字段[CEDevice]
CEDevice字段是程序所对应的设备平台,这个大家就不用去管它了。 
第四个字段[SourceDisksNames]
是指定源文件程序所在的磁盘路径。
1=,"cab",,"D:\oasourcedir\programe\"
可以修改"D:\oasourcedir\programe\"来指定源文件所在路径,也就是要制作安装盘的*.exe等文件路径,其它的都不要修改了。
第五个字段[SourceDisksFiles]
就是大家要打包的源文件清单,后面的=1就表示文件的路径,也就是[SourceDisksNames]中的1。
oa.exe=1
readme.txt=1
my.jpg=1
有多少个要打包的源文件都可以把名字加上即可,格式为:文件名.文件类型 = 1
第六个字段[DefaultInstall]
CEShortcuts=CEShortcuts1,CEShortcuts2,CEShortcuts3,CEShortcuts4
CopyFiles=Files.Common
AddReg=RegData
就是安装程序到手机中时:
CopyFiles参数表示安装时如何解压拷贝文件,AddReg参数表示安装时如何修改注册表。CEShortcuts参数表示如何在Wince桌面创建快捷方式。
CopyFiles=后面跟着是字段名字,即你所要做的拷贝工作到底有哪些。AddReg=作用一样。
例如在范本中,CopyFiles=Files.Common就是告诉cabwiz.exe要做一个拷贝文件工作,
需把一些文件拷贝到安装指定目录文件夹下,要拷贝的文件在[Files.Common]字段中。
而AddReg=RegData表示安装程序还要修改注册表,修改的东西在[RegData]字段中。
第七个字段[Files.Common]
就是安装拷贝文件到手机中,目标安装时需要拷贝哪些文件,应该与[SourceDisksFiles]中的文件名字一致。
oa.exe,oa.exe,,0
readme.txt,readme.txt,,0
my.jpg,my.jpg,,0
第八个字段[Shortcuts] 
关于应用程序桌面快捷方式设置:
Sample App,0,sample.exe
Sample App,0,sample.exe,%InstallDir%
字段语法说明一下,四个域,域之间用逗号隔开,前三个域的内容必须填写。
第一个域是快捷键名称,也就是在Wince桌面快捷方式名称。
第二个域中0表示是文件,其他任何非零数表示为目录,
第三个域就是快捷键的目标程序(目录),
第四个域是可选域,是安放快捷键的目录,默认目录就是[DestinationDirs]中Shortcuts = "",你可以指定其他目录,如你想在开始菜单中加入自己的快捷键的话就在这里写上storage\windows\startmenu\。
下面是范例:
移动OA,0,oa.exe,UserData\myoa
第九个字段[RegData]
就是安装程序到手机步骤中时,修改注册表。
第一个“,”之前表示注册表中的四大块的名字,直接用缩写就可以了,如范本中HKLM就代表HKEY_LOCAL_MACHINE,其他三个分别为HKCR,HKCU和HKU。
第二个“,”之前表示你要修改的键的具体路径(如果没有会自动建立),即完整的项(key)名称,
第三个“,”之前就表示你要具体修改的键(就是我们经常在修改注册表的文章中看到的Value Name),如果没有的话程序就会自动建立,
第四个“,”之前表示值类型,目前我只懂得整数是0x00010001(见补充2),字符型数据这里你就不要填了,留着个“,”就可以了。最后就是你要填入的Value。
在范例中
HKLM,SOFTWARE\Microsoft\Shell\Rai\:CallAlert,BKBitmapFile,,"\Storage\Application Data\Home\iMac\call1.jpg" 
表示修改(建立)名为BKBitmapFile的键的值,它在HKLM\SOFTWARE\Microsoft\Shell\Rai\:CallAlert下,值内容为\Storage\Application Data\Home\iMac\call1.jpg,很明显,这是一个值为String类型的键。

四、如何可以得到一个INF文件范例

   安装一个WinCE CAB Manager,最好安装一个中文汉化的,打开一个现在的CAB文件,从菜单中选择文件-导出-导出到INF,再选择好导出路径,完成,就可以在你指定的目录出一个当前CAB文件的INF文件,呵呵中!你可以自己好好研究一下了!

四、快递制作自己的CAB包
写一个INF包对于我这个的人来说还是比较花时间的,我一般的方法是:找一个现在的CAB包,用WinCE CAB Manager打开它,在WinCE CAB Manager,的操作界面上直接删除、添加文件或是修改注册表项,最后保存就得到自己的CAB包了。
相信看到这里大家应该都会制作自己的CAB包了!

WinCE_Cab_Manager_v3[1][1].0.0.22_汉化XX绿色版.part1.rar (1.95 MB)

 

 

WinCE_Cab_Manager_v3[1][1].0.0.22_汉化XX绿色版.part2.rar (1.95 MB)

 

 

WinCE_Cab_Manager_v3[1][1].0.0.22_汉化XX绿色版.part3.rar (1.95 MB)

 

 

WinCE_Cab_Manager_v3[1][1].0.0.22_汉化XX绿色版.part4.rar (262.04 KB)

http://bbs.23dopod.com/thread-9876-1-1.html

将cab文件导入到PPC中进行安装:

 

Most software for Windows Mobile devices (Pocket PCs,touchscreen Windows Mobile Smartphones and non-touchscreen Windows Mobile Smartphones) is downloaded as an executable .EXE file.  These files run within Windows, then install themselves on your Pocket PC or Windows Mobile Smartphone via ActiveSync. 

 

Sometimes, however, a program is downloaded as a .CAB, or cabinet, file. These files are designed to run and install themselves within Windows Mobile, and must be transferred to your Pocket PC or Smartphone before they can be installed. 

 

In this tutorial, we'll show you how to install applications distributed as .CAB files on your Windows Mobile device. 

 

NOTE: For the purposes of this tutorial, we'll install Pocket Google on a Dell Axim X50v Pocket PC; however the same process works for touchscreen Windows Mobile Smartphones.  The filename for the installer is PocketGoogle.cab.

Step 1: Moving the .CAB File to Your Windows Mobile Device

Our first step is simply transferring the .CAB file to the Windows Mobile handheld.  The installer file PocketGoogle.cab is located on our Windows desktop. 

To begin, connect the handheld to your Windows PC using a USB cable or cradle.  Allow the synchronization process to complete.  Inside ActiveSync, click the Explore button on the toolbar:

Use the Explore feature of ActiveSync to view the files stored on your Windows Mobile device just like you would view the contents of a folder stored on your computer's hard drive...

 

The Explore feature of ActiveSync is very useful; it provides access to the files stored on your Pocket PC or Windows Mobile Smartphone inside of the Windows OS. 

With the Mobile Device screen open on your desktop, left-click and hold the .CAB file, and drag it to the Mobile Device screen, then release the mouse button:

Drag and drop the .CAB file from your Windows PC to the Mobile Device window.  Dragging and dropping files from your PC to your Windows Mobile device is exactly like dragging and dropping files from one folder to another within Windows...

 

That's it.  The file has now been transferred to the mobile device.

NOTE: If you copied the file to a subfolder rather than the root "Mobile Device" folder shown above, you'll need to note the .CAB file's folder location for the next step.

Step 2: Install the .CAB File's Software

Now that the .CAB file has been copied to your Windows Mobile device, we're ready to install the program. 

On the handheld, tap Start > Programs > File Explorer.  If you followed the instructions above and moved the file to the root Mobile Device window, navigate to the My Documents folder:

Use File Explorer to view files stored on your Pocket PC / Smartphone.  Just like "My Computer" on your Windows PC, File Explorer allows you to manage, run, edit, copy or delete files stored in your device's memory...

 

You should see the file you transferred in the My Documents folder.  When you find it, tap it with your stylus (or, on a non-touchscreen smartphone, highlight the file and hit the OK key). The .CAB file will begin the installation process.  Follow the instructions on screen, which may vary from program to program:

Allow the installation process to complete...

 

Your software has now been installed and is ready to use:

Installed software, in this case Pocket Google, show up as an icon in the main Programs menu...

Final Thoughts

In some cases, opening a .CAB file and installing the software contained within will cause the file to be deleted when the installation process is complete.  In other cases, you'll  need to manually delete the .CAB file using File Explorer.  Leaving the .CAB file in your handheld's memory will take up space, but is perfectly safe.

If you're more comfortable moving files to your Windows Mobile device using a flash memory card and a memory card reader, feel free to do so.  This tutorial covered the ActiveSync method of transferring files in the interests of universality (since some users don't have card readers in their PCs).

It is also possible to download software contained within a .CAB file directly to your Windows Mobile Pocket PC or Smartphone from the Internet.  If you download the .CAB file directly to your device, simply begin at Step 2 to install the software if it doesn't install automatically.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值