将桌面快捷方式部署到运行Windows CE 4.2(VS2005)的设备上 [英] Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)

查看:181
本文介绍了将桌面快捷方式部署到运行Windows CE 4.2(VS2005)的设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中编写了一个使用VS2005编写的应用程序,针对Compact Framework 2.0 SP2。作为解决方案的一部分,我有CAB部署项目部署到设备没有问题。我不能做的是在设备桌面上创建我的应用程序的快捷方式。

I have an application written using VS2005 in C# targeting the Compact Framework 2.0 SP2. As part of the solution, I have CAB deploy project which deploys to the device without a problem. What I can't do is create a shortcut to my application on the devices desktop.

我花了几个小时阅读各种文档(为什么在MSDN网站如此糟糕?),遵循指示,但没有喜悦。

I have spent several hours reading various bits of documentation (why is the search at the MSDN site so bad?), followed the instructions but no joy.

我所做的是:


  • 添加Windows文件夹节点到文件系统

  • 创建了名为桌面的文件夹

  • 创建了应用程序主要输出的快捷方式,并将其放在桌面文件夹

我缺少什么?

推荐答案

Windows CE快捷方式(任何版本或风格的CE,包括WinMo)都使用基于ASCII文本的文件。它们的格式为:

A Windows CE shortcut (CE of any version or flavor, including WinMo) uses a ASCII-text based file. They are in the form:

{XX}#{PATH}

{XX}#{PATH}

其中:


  • XX =路径中的字符数,包含#号的号码

  • PATH =完全限定要运行文件的路径

例如:

20# \\ Windows \calc.exe

20#\Windows\calc.exe

另一个选项是使用用于生成CAB的INF文件的CEShortcuts部分。

The other option is to use the CEShortcuts section of the INF file used to generate your CAB.

在INF的[DefaultInstall]部分,将CEShortcuts设置为您选择的部分名称(类似于快捷方式),然后使用快捷方式描述符添加该部分。 MSDN 在此详细介绍

In the [DefaultInstall] section of the INF, set the CEShortcuts to a section name of your choice (something like "Shortcuts"), then add that section with your shortcut descriptor. MSDN details it here.

MSDN还有一篇关于创建部署项目以生成cab的文章(可以在这里),但诚实地说,项目的能力是有限的,而且IMO的工具通常是很糟糕的。到目前为止,我们仍然直接拨打CABWIZ(这也是我们唯一的选择),手写的INF文件。

MSDN also has an article on creating a deployment project to generate the cab (available here), but in all honesty, the project capabilities are limited and IMO the tool just generally sucks. To this day we still use direct calls to CABWIZ (which also sucks, but it's our only choice) with hand-written INF files.

这篇关于将桌面快捷方式部署到运行Windows CE 4.2(VS2005)的设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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