Windows CE Shortcuts

When you boot a Windows CE operating system image which uses the Standard Shell (the shell that looks similar to the Windows Desktop shell) 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, these can be created, and edited using your favorite Notepad application.

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


So, how does this work, 21# means that the command line contains 21 characters, and 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!)  the Internet Explorer shortcut, 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 the 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 O/S .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, .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.

- Mike

Skip to main content