Windows Embedded CE 6.0: How to Create Shortcuts

原文地址

Mike Hall
When you boot a Windows CEoperating system image that uses the Standard Shell (the shell thatlooks similar to the Windows Shell, most commonly experienced as theWindows Desktop) you will notice shortcuts to Internet Explorer and theImage Viewer on the desktop. Perhaps, when creating your own operatingsystem image, you might want to create your own shortcuts.

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

Let's take asimple example to start, an application that no self-respectingoperating system should be without ... Solitaire! Shortcuts have thefile 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 linecontains 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 alsovery simple!) This example is the Internet Explorer shortcut file,iesample.lnk. Here's the content of the file:27#\Windows\iexplore.exe-homeThe command line, including the optional parameter -home is 27characters. Notice that the Internet Explorer shortcut contains notonly the location of the program, but also includes the -home commandline. This instructs Internet Explorer to open at the home page. But,wait a second. On the desktop, the shortcut appears as InternetExplorer, not as a shortcut to Iesample. When the Windows CE operatingsystem gets built, we can examine the contents of the overall operatingsystem .dat file, initobj.dat (the .dat file contains the creation offolders and maps files to folders). Here's the interesting line fromthe .dat file:
Directory("\Windows\Desktop"):-File("Internet Explorer.lnk", "\Windows\iesample.lnk")
Noticehow the actual file, \Windows\iesample.lnk, maps to the\Windows\Desktop folder and appears as Internet Explorer.lnk on thedesktop. 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 operatingsystem image (perhaps using CEFileWiz) and map the file to a folderother than the \Windows folder.

Mike Hall is a TechnicalProduct Manager in the Windows Embedded Product Group. To get moreinsights into Windows Embedded, read his blog.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值