当前位置:编程学习 > wap >>

用VS2008生成的CAB,如何让它传到手机上就自动安装!!!

用VS2008创建智能设备CAB生成的CAB文件,如何修改它的INF文件,另外最重要的是如何让它下载到终端上就自动安装,或者弹出提示框提示用户是否要进行安装,无需点击CAB安装包去安装!很急!谢谢! --------------------编程问答-------------------- 你见过这种功能吗?CAB一考到机子上就安装了? --------------------编程问答-------------------- 下载下来用一个进程启动它,然后安装吧。
只能这样了。 --------------------编程问答-------------------- 没试过。。 --------------------编程问答-------------------- 顶,  --------------------编程问答-------------------- copy and click --------------------编程问答-------------------- 考虑到手机的安全机制 这种方式根本不行 --------------------编程问答-------------------- CE或者Mobile上有一种AutoRun的机制,你可以在MSDN上搜索一下,搜AutoRun即可搜到相关内容.

英文原文如下:
The Pocket PC has a feature that can automatically launch an application when any new external storage is detected such as the insertion of a CompactFlash or Secure Digital card. This feature is typically used to provide an auto-install feature for software. However, there is no reason the application launched has to be an installation program.

When the shell detects that a storage card has been inserted, it looks in the root directory of that card for a directory with a specific name. If that directory exists and contains an application named autorun.exe, the application is first copied to the \windows directory, and then launched with a command line string install. When the card is removed, the copy of autorun in the \windows directory is again launched, this time with a command line of uninstall.

The directory that the Pocket PC searches for depends on the type of CPU in the device because an application must be compiled specifically for a CPU. The autorun directory names match the CPU type value returned from the GetSystemInfo function. The following list shows the values for a few of the more popular CPUs. All the CPU values are defined in Winnt.h.

MIPS (41xx series and 3910) 4000 
SH3 10003 
SH4 10005 
StrongARM 2577 
XScale 1824 

When autorun.exe is launched, it might need to know which directory it was copied from on the storage card. The application can't use GetModuleFileName because it was copied and launched from the \windows directory. To determine the fully specified autorun path, an application can call

BOOL SHGetAutoRunPath (LPTSTR pAutoRunPath);
The single parameter is the address of a TCHAR buffer of at least MAX_PATH characters. The function will fail if no storage card is found. If a card is inserted, the function returns the expected autorun directory whether or not the actual folder exists on the storage card. For example, for a system with a StrongARM CPU and an Autorun.exe file in the appropriate directory, the directory returned is \storage card\2577\autorun.exe. 

SHGetAutoRunPath can optionally be supported by systems based on Windows CE .NET 4.2 or later. However, the Explorer shell does not automatically launch applications from storage cards. An OEM could easily add this feature if needed. 




--------------------------------------------------------------------------------

This topic is from Programming Microsoft Windows CE, Third Edition, by Douglas Boling, published by Microsoft Press. © 2003 by Douglas McConnaughey Boling. Reprinted here by permission of the author.
--------------------编程问答-------------------- 好像要手动才能安装 --------------------编程问答-------------------- 架个ftp,通过手机上的IE下载时,就会提示是要运行还是保存 --------------------编程问答-------------------- 拷贝再点击也不是什么麻烦事... --------------------编程问答-------------------- 这简单啊 
补充:移动开发 ,  Windows Phone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,