zoukankan      html  css  js  c++  java
  • 怎样用wince设备创建快捷方式

    How to Create Windows CE Shortcuts

    Mike Hall
    http://msdn.microsoft.com/en-us/embedded/aa731295.aspx


    When you boot a Windows CE operating system image that uses the Standard Shell (the shell that looks similar to the Windows Shell, most commonly experienced as the Windows Desktop) you will notice shortcuts to Internet Explorer and the Image Viewer on the desktop. Perhaps, when creating your own operating system image, you might want to create your own shortcuts.

    By default, all applications and files are mapped to the \Windows folder. Shortcuts take very little space (as you will see in a moment), and can also include command line parameters (more on that in a moment). Shortcut files are simply text files that can be created and edited using your favorite text editing application.

    Let's take a simple example to start, an application that no self-respecting operating system should be without ... Solitaire! Shortcuts have the file extension .lnk, so the shortcut file is going to be Solitare.lnk, and would contain the following:

    21#\Windows\solitare.exe

    So, how does this work? In the code, 21# tells us that the command line contains 21 characters and that the command line is \Windows\Solitare.exe (which is 21 characters, count them!)

    Now, let's take a look at a slightly more elaborate example, (but it's also very simple!) This example is the Internet Explorer shortcut file, iesample.lnk. Here's the content of the file:

    27#\Windows\iexplore.exe -home

    The command line, including the optional parameter -home is 27 characters. Notice that the Internet Explorer shortcut contains not only the location of the program, but also includes the -home command line. This instructs Internet Explorer to open at the home page. But, wait a second. On the desktop, the shortcut appears as Internet Explorer, not as a shortcut to Iesample. When the Windows CE operating system gets built, we can examine the contents of the overall operating system .dat file, initobj.dat (the .dat file contains the creation of folders and maps files to folders). Here's the interesting line from the .dat file:

    Directory("\Windows\Desktop"):-File("Internet Explorer.lnk", "\Windows\iesample.lnk")

    Notice how the actual file, \Windows\iesample.lnk, maps to the \Windows\Desktop folder and appears as Internet Explorer.lnk on the desktop. The .dat file entries can be used to map and rename files, pretty cool, eh?

    So, there we have it, how to create shortcuts. The next (simple) step would be to add the .lnk file to the operating system image (perhaps using CEFileWiz) and map the file to a folder other than the \Windows folder.

  • 相关阅读:
    对QR码的初步研究(附:在博客里放上博客文章的QR码)
    EonerCMS——做一个仿桌面系统的CMS(十四)
    终于病了
    【HoorayOS】开源的Web桌面应用框架(第二版 v120311)
    【HoorayOS】开源的Web桌面应用框架——EonerCMS更名为HoorayOS
    一句代码实现 HTML5 语音搜索
    HTML5 拖拽上传图片实例
    【HoorayOS】开源的Web桌面应用框架
    【HoorayOS】开源的Web桌面应用框架(文件夹功能分析)
    从源码分析常见的基于Array的数据结构动态扩容机制
  • 原文地址:https://www.cnblogs.com/weiqi/p/1436166.html
Copyright © 2011-2022 走看看