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

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

问题描述

我有一个使用 VS2005 用 C# 编写的应用程序,目标是 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#Windowscalc.exe

20#Windowscalc.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 工具通常很糟糕.直到今天,我们仍然使用手写 INF 文件直接调用 CABWIZ(这也很糟糕,但这是我们唯一的选择).

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天全站免登陆